Fine User Mobile Location With My Location Feature Of Google Maps
Does My Location feature of google maps has any API ? I need to localize users in the iphone/android/blackberry phones browsers, starting by trying to get the GPS location, then Ce
Solution 1:
I presume this is a HTML? If so, use HTML5 Geo Location API. It works on Android/iPhone and the more recent BlackBerry devices. Example of use:
Updated to set enableHighAccuracy to true so the device will attempt to get high accuracy location
navigator.geolocation.getCurrentPosition(locationHandler, locationErrorHandler,
{enableHighAccuracy:true});
functionlocationHandler(position)
{
var lat = position.coords.latitude;
var lng = position.coords.longitude;
}
Post a Comment for "Fine User Mobile Location With My Location Feature Of Google Maps"