This event is fired when you tap on POIs(such as building icon).
name | type | description |
---|---|---|
placeId | string | place id for Google Places API |
name | string | place name |
latLng | LatLng | place location |
<div id="map_canvas"></div>
var div = document.getElementById("map_canvas");
var map = plugin.google.maps.Map.getMap(div, {
camera: {
target: {
lat: 37.422000,
lng: -122.084057
},
zoom: 15
}
});
// Show a virtual dialog (loader.js)
showVirtualDialog(div, "Click on POI icon!");
map.on(plugin.google.maps.event.POI_CLICK, function(placeId, name, latLng) {
var marker = map.addMarker({
'position': latLng,
'title': [
"placeId = " + placeId,
"name = " + name,
"position = " + latLng.toUrlValue()
].join("\n")
});
marker.showInfoWindow();
});