-
Notifications
You must be signed in to change notification settings - Fork 917
Geocoder
###Geocoding This plugin supports geocoding. You can convert address or landscape names to latitude and longitude. In Android, this plugin uses Google Play Services feature, while in iOS this plugin uses iOS feature (not Google).
var request = {
'address': "Kyoto, Japan"
};
Geocoder.geocode(request, function(results) {
if (results.length) {
map.showDialog();
var result = results[0];
var position = result.position;
map.addMarker({
'position': position
});
} else {
alert("Not found");
}
});
###Reverse geocoding This plugin also supports reverse geocoding.
var request = {
'position': GOOGLE
};
Geocoder.geocode(request, function(results) {
if (results.length) {
var result = results[0];
var position = result.position;
var address = [
result.subThoroughfare || "",
result.thoroughfare || "",
result.locality || "",
result.adminArea || "",
result.postalCode || "",
result.country || ""].join(", ");
map.addMarker({
'position': position,
'title': address
});
} else {
alert("Not found");
}
});
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