I am new to this forum, however I have found help here many times before, so I am hoping the same happens this time :)
What I would like to do is run a Google Map application on a mobile phone, run the "My Location" feature and get the GPS Co-Ordinates. I would like to do this programmatically.
I could use the built in GPS device, however, in most cases it's about inaccurate by about 20m, which is a bit too much for me. On the other hand, the My Location feature is usually off by a couple of meters (usually less than 5m) which in my case will be enough.
The problem is that I have been looking on the web to see if this can be done. So far, the only way, it seems, that I managed to find to get GPS coordinates from Google Maps is to use开发者_如何学C some sort of JSP snippet manually.
So basically my question is: Can this be done, and if yes how?
Thanks in advance :)
The Google Maps API doesn't provide access to your current location (or an estimate of that location). The My Location functionality at maps.google.com uses the Google Gears GeoLocation API to determine the users location. According to the Gears API reference:
The Geolocation API provides the best estimate of the user's position using a number of sources (called location providers). These providers may be onboard (GPS for example) or server-based (a network location provider).
I am not sure if Gears works in the browser for your mobile platform. I am assuming it does if the My Location functionality on maps.google.com works.
精彩评论