Skip to content

Instantly share code, notes, and snippets.

@andrewxhill
Created May 13, 2014 11:51
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/fc77170db4eeca1daeb7 to your computer and use it in GitHub Desktop.
Save andrewxhill/fc77170db4eeca1daeb7 to your computer and use it in GitHub Desktop.
var map = new L.Map('map_canvas', {
center: [0,0],
zoom: 2
});
cartodb.createLayer(map, 'your-vis-json')
.addTo(map)
.on('done', function(layer) {
//do stuff
})
.on('error', function(err) {
alert("some error occurred: " + err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment