-
Notifications
You must be signed in to change notification settings - Fork 918
Location
This class represents device position.
###Example The getMyLocation() method of Map class returns the Location data of your device.
map.getMyLocation(function(location) {
var msg = ["Current your location:\n",
"latitude:" + location.latLng.lat,
"longitude:" + location.latLng.lng,
"speed:" + location.speed,
"time:" + location.time,
"bearing:" + location.bearing].join("\n");
map.addMarker({
'position': location.latLng,
'title': msg
}, function(marker) {
marker.showInfoWindow();
});
});
Property | Return value | Description |
---|---|---|
latLng | LatLng | The device location. |
time | Number | Return the UTC time of this fix, in milliseconds since January 1, 1970. |
elapsedRealtimeNanos | Number | Return the time of this fix, in elapsed real-time since system boot. |
accuracy | Number | The estimated accuracy of this location, in meters. |
bearing | Number | Bearing, in degrees. |
altitude | Number | The altitude if available, in meters above sea level. |
speed | Number | The speed if it is available, in meters/second over ground. |
provider | Number | The name of the provider that generated this fix. |
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