Skip to content

Instantly share code, notes, and snippets.

@andrewxhill
Created June 21, 2013 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewxhill/5830532 to your computer and use it in GitHub Desktop.
Save andrewxhill/5830532 to your computer and use it in GitHub Desktop.
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