Comments (7)
BMap is from Baidu map SDK, you should import Baidu SDK first.
from react-bmap.
@zmofei which npm modules is the Baidu map SDK in?
from react-bmap.
you can get Baidu map SDK from http://lbsyun.baidu.com/, then you can import the SDK from the URL http://api.map.baidu.com/api?v=2.0&ak=YOUR_SDK
.
eg:
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=YOUR_SDK"></script>
<script>
// ... your code
</script>
from react-bmap.
I have that on the browser side.
I am using Meteor + React and the server is crashing because BMap is not defined there.
Let me see if Baidu map SDK has a npm package.
from react-bmap.
Problem solved.
I had to stop importing react-bmap at run time to prevent the server from picking it up.
It can then be loaded in the browser once Baidu SDK is loaded in the browser the functions using require
or dynamic import
.'
from react-bmap.
@williamli I have the same problem. How do you solve it
from react-bmap.
@williamli I already install vue-baidu-map,but still have this problem;
from react-bmap.
Related Issues (20)
- MapvLayer多个图层,点击事件,只有最后一个图层有效
- 提一个当center设置为城市的bug HOT 1
- Autocomplete 下拉选项列表为空 HOT 1
- new BMap报错 HOT 2
- 热力图显示有问题,麻烦大佬帮忙看一下~ HOT 2
- 请问能不能像gl版本一样封装个高阶组件实现异步加载
- Circle组件如果设置enableEditing属性为true,切换路由回来后会报错
- 请问Polygon和Circle这些覆盖物如何设置z-index
- 浏览器手机模式下地图不响应鼠标滚轮缩放
- Uncaught ReferenceError: BMapGL is not defined HOT 1
- 本地与服务器地图渲染不一致
- 百度地图Marker打点,拖拽地图之后Marker点位消失 HOT 1
- IOS,控制台划下一次之后,地图无法滑动
- 关于自定义Marker的icon 图标出现问题的情况
- 百度有没有无底图模式
- 有没有vue3版本的
- 设置了个性化地图之后,缩小页面再刷新页面,地图错位
- 点击切换Marker,改变当前icon的颜色不生效,数据更新了,组件没有重新render
- 改变地图的宽度,InfoWindow和Marker自动移动了,地图没有动
- 怎么样才能让 Arc 组件支持往返动画?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-bmap.