I have been trying to use bing maps API's function getCurrentPosition from a mobile device via 3G internet. I was expecting the Samsung SIII, being a high spec device, to work without any problems.

However when the mobile connects over WiFi I am able to get my location whereas when I switch the connection to 3G I do not get my actual location.

The pushpin does point to my house but as I move away from it, it does not react to my position. It's like getting the location of the server hosting the function (which is my computer at my house).

The GPS is on and correctly set on the mobile too.

Moreover, the getCurrentPosition is inside a recursive loop which invokes it every 500ms.

Now I know for sure that bing maps API works mobile devices since I have been involved in a Vodafone organized treasure hunt using tablets. Please guide me to solve my issue.

Thanks, Justin

有帮助吗?

解决方案

The positioning service is directly related to the device and its own implementation to find the position assumed by and from the various method that was used to find the best matching. It does not seem to be directly related to Bing API in this specific case.

In order to improve positioning speed and precision, the different systems can switch to Wifi-Positioning to other method like A-GPS or even cell identification.

If you try to get the information about your position based on your wifi, on Android, we can easily assume that it will used the Wifi-cell as the position that means that the known location would be the one retrieve from various crowdsourced information from your own devices and also others. That said, in WiFi, you will not be moving, you are connected to the Wifi cell without any other information.

If you cannot get your position in 3G, try to go outside so it can use the most precise positioning method (A-GPS) as it appears that phone cell-id is not working in your area.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top