<!DOCTYPE HTML><HTML><HeadLang= "en"> <MetaCharSet= "UTF-8"> <title>Leaflet Demo</title> <Linkrel= "stylesheet"href= "//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css"/></Head><Body><DivID= "Map"></Div><Scriptsrc= "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></Script><Scriptsrc= "//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></Script></Body></HTML>
$.getjson ('//jsbin.com/qogati/1.js ', rendermap);functionRendermap (geoData) {varMap = l.map (' map '); varOSM = '//{s}.tiles.mapbox.com/v3/examples.map-i87786ca/{z}/{x}/{y}.png '; L.tilelayer (OSM). AddTo (map); varGeoJson =L.geojson (GeoData, {style:function(feature) {return{weight:1, opacity:0.5, Color:' #00ff00 ', FillColor:' #00dd00 ', fillopacity:0.2}} ). AddTo (map); Map.fitbounds (Geojson.getbounds ());}
[Javascript] Adding Shapes to Maps with leaflet and GeoJSON