Masashi Katsumata edited this page Sep 20, 2016 · 13 revisions

Join the official community

New versions will be announced through the official community. Stay tune!

Do you have a question or feature request?

Feel free to ask me on the issues tracker.

Or on the official community is also welcome!

Jump to...

Clone this wiki locally

Add a KmlOverlay

map.addKmlOverlay() adds geographic markup onto the map from a KML file. You can specify the file using one of the following protocols: http, https, file, cdvfile or the file absolute path. Only Android, also accepts file:///android_asset/. The added overlays are clickable.

PhoneGap-GoogleMaps-Plugin can parse only Polyline, Polygon, and Markers currently

Field Name Type Description
url String The url of the kml file (file path or network url)
preserveViewport Boolean Set true if prevent the camera animation after overlays are added. (Default: false)
animation Boolean Set false if you want to change the camera view without animation. (Default: true)
  'url': "www/polygon.kml"
}, function(kmlOverlay) {
  kmlOverlay.on(, function(overlay, latLng) {
    if (overlay.type == "Polygon") {
    if (overlay.type == "Polyline") {
    if (overlay.type == "Marker") {


KmlOverlay Class Reference

Method Return value Description
getMap() Map Return the map instance.
remove() void Remove the kml overlay.
getOverlays() Array.<Polyline | Polygon | Marker> Return the overlays that loaded from KML file.