-
Notifications
You must be signed in to change notification settings - Fork 918
Map.getMyLocation()
The callback function will be involved with current your location as Location data.
###enableHighAccuracy option
As of v1.2.0, you can specify enableHighAccuracy
option that attempt to get your location with highest accuracy.
var opts = {
enableHighAccuracy: true
};
map.getMyLocation(opts, onSuccess, onError);
###Code
var option = {
enableHighAccuracy: true // Force GPS
};
map.getMyLocation(option, onLocationSuccess, onLocationError);
function onLocationSuccess( result ) {
alert(JSON.stringify( result, null, 4 ));
}
function onLocationError( error_msg ) {
alert( error_msg );
}
If you get an error, feel free to ask me on the official community or the issue list.
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md
New versions will be announced through the official community. Stay tune!
Feel free to ask me on the issues tracker.
Or on the official community is also welcome!
New version 2.0-beta2 is available.
The cordova-googlemaps-plugin v2.0 has more faster, more features.
https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md