hafrans commented on issue #5697: 使用react开发,Uncaught Error: BMap api is not loaded URL: https://github.com/apache/incubator-echarts/issues/5697#issuecomment-484105694 README中写的关于引用一节提到: > ### 引入 > > 可以直接引入打包好的扩展文件和百度地图的 jssdk > > ```html > <!--引入百度地图的jssdk,这里需要使用你在百度地图开发者平台申请的 ak--> > <script src="http://api.map.baidu.com/api?v=2.0&ak="></script> > <!-- 引入 ECharts --> > <script src="dist/echarts.min.js"></script> > <!-- 引入百度地图扩展 --> ><script src="dist/extension/bmap.min.js"></script> > ``` > > 如果是 webpack 打包,也可以 require 引入 > > ```js > require('echarts'); > require('echarts/extension/bmap/bmap'); > ``` 如果对模块本身不太熟悉的话,如果使用webpack打包,在看README时候会很容易忽略对api的引入,即` <script src="http://api.map.baidu.com/api?v=2.0&ak="></script>`,从而造成 BMap api is not loaded .
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
