This plugin helps you to control Google Maps Android SDK v2 and Google Maps SDK for iOS from your JavaScript code. This plugin works with Apache Cordova.
//Define the location
var GOOGLE = new plugin.google.maps.LatLng(37.422858, -122.085065);
//Initialize a map
var map = plugin.google.maps.Map.getMap();
map.addEventListener(plugin.google.maps.event.MAP_READY, function(map) {
// The map is initialized, then show a map dialog
map.showDialog();
// Add a marker onto the map
map.addMarker({
'position': GOOGLE,
'title': ["Hello Google Map", "for", "Cordova!"].join("\n"),
'snippet': "This plugin is awesome!"
}, function(marker) {
// Move camera position
map.animateCamera({
'target': GOOGLE,
'zoom': 15
}, function() {
//Show the infoWindow assigned with the marker
marker.showInfoWindow();
});
});
});
###Example You can try the example of this plugin. SimpleMap_v1.0.2.apk
###Documentation
- [Installation] (https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Installation)
- Automatic Installation
- Tutorials
- Map
- Create a map
- Create a map with initialize options
- Change the map type
- Move the camera
- Move the camera within the specified duration time
- Get the camera position
- Get my location
- Map Class Reference
- Marker
- Add a Marker
- Show InfoWindow
- Add a marker with multiple line
- callback
- Simple Icon
- Scaled Icon
- Base64 Encoded Icon
- Remove the marker
- Click a marker
- Click an infoWindow
- Create a marker draggable
- Drag Events
- Create a flat marker
- Marker Class Reference
- Circle
- Add a circle
- callback
- Remove the circle
- Circle Class Reference
- Polyline
- Add a polyline
- callback
- Remove the polyline
- Polyline Class Reference
- Polygon
- Add a polygon
- callback
- Remove the polygon
- Polygon Class Reference
- Tile Overlay
- Add a tile overlay
- TileOverlay Class Reference
- Ground Overlay
- Add a ground overlay
- GroundOverlay Class Reference
- Geocode
- Geocoding
- Reverse geocoding
- LatLng class
- Create a LatLng object
- LatLng Class Reference
- CameraPosition class
- CameraPosition Class Reference
- Location class
- Location Class Reference