Giter Site home page Giter Site logo

Comments (7)

zmofei avatar zmofei commented on June 15, 2024

BMap is from Baidu map SDK, you should import Baidu SDK first.

from react-bmap.

williamli avatar williamli commented on June 15, 2024

@zmofei which npm modules is the Baidu map SDK in?

from react-bmap.

zmofei avatar zmofei commented on June 15, 2024

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.

williamli avatar williamli commented on June 15, 2024

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.

screen shot 2017-08-25 at 11 19 21

from react-bmap.

williamli avatar williamli commented on June 15, 2024

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.

FateZeros avatar FateZeros commented on June 15, 2024

@williamli I have the same problem. How do you solve it

from react-bmap.

DANIEL73H avatar DANIEL73H commented on June 15, 2024

@williamli I already install vue-baidu-map,but still have this problem;

from react-bmap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.