Created
February 25, 2013 02:07
-
-
Save SpencerCooley/5026891 to your computer and use it in GitHub Desktop.
How to place an array of geojson features on a leaflet map.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//using leaflet.js | |
var theMap = L.map('the_map_div', { | |
center: whereYouWantToCenterYourMap, | |
layers: mapBoxLayer, | |
zoom: 11, | |
maxZoom: 18 | |
}); | |
var theFeaures = geoJsonObjectThatYouSentMe; | |
$.each(theLocations['features'], function(index, value){ | |
L.geoJson(value).addTo(theMap) | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment