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?
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.
/a/11...