Created
June 21, 2013 11:10
-
-
Save andrewxhill/5830532 to your computer and use it in GitHub Desktop.
This file contains 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
var url = "https://osm2.cartodb.com/api/v2/sql?format=geojson&q=SELECT cartodb_id,the_geom FROM leaflet_data"; | |
$.getJSON(url, function(data){ | |
geojsonLayer = L.geoJson(data,{ | |
onEachFeature: function (feature, layer) { | |
layer.cartodb_id=feature.properties.cartodb_id; | |
drawnItems.addLayer(layer); | |
} | |
}); | |
map.addLayer(drawnItems); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment