huiyan-fe / react-bmapgl

基于百度地图JavaScript GL版API封装的React组件库
http://huiyan.baidu.com/github/react-bmapgl/
MIT License
115 stars 20 forks source link

Uncaught ReferenceError: BMapGL is not defined #50

Closed Julycc41 closed 2 years ago

Julycc41 commented 2 years ago

react-bmapgl 下载完后, html 存放 statr后 一直报这个错 请问是什么情况呢 1657011841358 1657011866994 1657011886700

Julycc41 commented 2 years ago

嘎嘎出来了 参考一下 异步加载 https://huiyan.baidu.com/github/react-bmapgl/#/%E5%9F%BA%E7%A1%80%E7%B1%BB/MapApiLoaderHOC

Junior2Ran commented 2 years ago

上面script加载的是2d地图的JSAPI 如果要用webgl地图,请加载webgl地图的JSAPI,如果要用2d地图,请用react-bmap