<html> <head> <title> Draw GeoJSON Polygon </title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="desciption" content="Mapmyindia Multiple Polygon GeoJSON "> <script src="https://apis.mapmyindia.com/advancedmaps/api/<--map_key-->/map_sdk?layer=vector&v=2.0&callback=initMap1" defer async></script> <link rel="icon" href="http://www.mapmyindia.com/images/favicon.ico" type="image/x-icon"> <style> #map{ width: 100%; height: 60vh; } </style> </head> <body> <div id="map"></div> <script> var map; // Map Function function initMap1() { map = new MapmyIndia.Map(document.getElementById('map'), { center: [28.5507160000001,77.2689280000001], zoomControl: true, location: true, scrollwheel:false }); var geojson={ "id":"bm", "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "name":"MapmyIndia", "stroke": "#33CC00", "stroke-opacity": 0.6509803921568628, "fill": "brown", "fill-opacity": 0.6509803921568628 }, "geometry": { "type": "Polygon", "coordinates": [[ [28.55092600263177,77.26903828466214], [28.550389489056016,77.26909293416855], [28.55038101776738,77.26887433614735], [28.55092882638013,77.26880682793563] ]] } }, { "type": "Feature", "geometry": { "type": "Point", "coordinates": [28.550868798522835,77.2689225803375] }, "properties": { "text-size":10, "text":"MOVE" } }, { "type": "Feature", "properties": { "stroke": "#33CC00", "stroke-opacity": 0.6509803921568628, "description":"DEN", "fill": "green", "fill-opacity": 0.6509803921568628 }, "geometry": { "type": "Polygon", "coordinates": [[ [28.55085258514582,77.26868788489435], [28.55040078410714,77.26873610504595], [28.55039796034464,77.26853036573283], [28.550815876384277,77.26848536025784] ]] } } ] } map.on('load',function(){ var mix=MapmyIndia.addGeoJson({ map:map, data:geojson, //cType:1, //if your geometry in lng,lat format fitbounds:true, callback1:mmi // call back function }); // call back function function mmi(e){ console.log(e); } }) } </script> </body> </html>

More Links

MapmyIndia Polygon with Text

Mapmyindia Click to Draw Polygon

MapmyIndia Editable Polygon