Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var map = new L.Map('map_canvas', {
center: [0,0],
zoom: 2
// add a nice baselayer from Stamen
L.tileLayer('http://{s}{z}/{x}/{y}.png', {
attribution: 'Stamen'
cartodb.createLayer(map, 'your-vis-json')
.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