Home  >  Q&A  >  body text

javascript - Baidu Maps' own products can provide precise positioning. Why do I have to obtain user consent to obtain precise positioning when I call its public API, and is it so slow?

In the desktop browser, I call the getCurrentPosition() method of new BMap.Geolocation() in the Baidu Map API to obtain the user's current coordinates. The browser needs to ask the user whether to disclose the location information (after all, user privacy is involved). If Selecting yes will get the precise coordinates, selecting otherwise will only get the coordinates of the current city.

But it is also a desktop browser and Baidu Maps' own product, but it can directly locate my precise location. There is no inquiry box, and the positioning speed is also very fast. I turned off the setting of public location information and still positioned quickly and accurately!

why is that? Is there any other way to obtain user coordinates in Baidu Maps API?

某草草某草草2663 days ago948

reply all(2)I'll reply

  • 过去多啦不再A梦

    过去多啦不再A梦2017-07-05 11:07:05

    In addition to obtaining GPS coordinates through geolocation, there is also a kind of network positioning, which is divided into wifi positioning and base station positioning. The positioning location is obtained by obtaining wifi or base station information, and then querying the corresponding wifi or base station location database. The positioning database can be continuously improved and supplemented, so the more accurate the positioning, the more accurate it will be.

    reply
    0
  • 巴扎黑

    巴扎黑2017-07-05 11:07:05

    /a/11...

    reply
    0
  • Cancelreply