Mapbox GL JS access token 问题

使用Mapbox GL JS时出现如下错误
Error: A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/


解决方法:
(1)MapBox在内网使用时,accesstoken不能使用,导致局域网内地图服务不能使用,只需修改mapbox-gl.js文件中“this._requestManager._customAccessToken,(e=>{if(e&&(false))”,框架就不会验证token,可内网部署。参考来源:https://blog.csdn.net/qq_58543270/article/details/121921553

Mapbox GL JS下载地址:
https://github.com/mapbox/mapbox-gl-js
https://github.com/mapbox/mapbox-gl-js/releases
https://gitee.com/mirrors/Mapbox-GL-JS

posted @   南珂丶一梦  阅读(651)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 一文读懂知识蒸馏
· 终于写完轮子一部分:tcp代理 了,记录一下
历史上的今天:
2018-05-10 基于webpack的vue项目路径别名
2018-05-10 mysql远程连接问题 Lost connection to MySQL server at ‘reading initial communication packet', system error: 0

喜欢请打赏

扫描二维码打赏

了解更多

点击右上角即可分享
微信分享提示