secret
Created

  • Download Gist
sql_geojson.js
JavaScript
1 2 3 4 5 6 7
var sql = new cartodb.SQL({ user: 'examples', format: 'geojson' });
 
// create the layer and add to the map, then will be filled with data
var countriesLayer = L.geoJson().addTo(map);
sql.execute("SELECT * FROM european_countries_e").done(function(geojson) {
countriesLayer.addData(geojson);
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.