Skip to content

Instantly share code, notes, and snippets.

@javisantana
Created May 14, 2013 16:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save javisantana/f571b8938618c706fd0b to your computer and use it in GitHub Desktop.
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);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment