Skip to content

Latest commit

 

History

History
109 lines (68 loc) · 3.84 KB

kml.md

File metadata and controls

109 lines (68 loc) · 3.84 KB

< Back to Table of Contents

MapmyIndia Interactive Vector Maps JS SDK for Web !

KML Overlays

KML: Keyhole Markup Language is a file format employed to showcase geographical data on maps. With this plugin, you have the capability to superimpose KML data onto Mappls Maps for web applications.

Mappls Live Demo | Code Pen Implementation

For access, you can get your api key from Mappls Console

KML Representation

Supported Object Types

  • Markers

  • Polylines

  • Polygons

Adding a KML layer on map

Required

  • Map
  • url: URL of the KML file.

Optional

  • fitbounds: Automatically adjusts the map layer to fit within the boundaries defined by the GeoJSON data. By default it is set to false.
	{
		fitbounds: true
	}
  • fitboundOptions: This shows the options available on the fitBound property.
	{
		fitboundOptions: {padding: 120,duration:1000}
	}
  • cType: It is for geojson data geometry
    • 0: for lat,lng combination (Default)
    • 1: for lng,lat conbination
    {
        cType: 1
    }

KmlLayer Method

Mappls.KmlLayer()

	var url="https://www.mapmyindia.com/api/advanced-maps/doc/sample/mmi.kml"; 
	new mappls.KmlLayer({
		map:map_object,
		url:url,
		cType:1,
		preserveViewport:true
	});

Remove KML Overlay

	mappls.remove({map:map_object,layer:KmlLayer_object});

For any queries and support, please contact:

Email us at apisupport@mappls.com

Support Need support? contact us!





@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.