Created
May 13, 2014 11:52
-
-
Save andrewxhill/734eccf8853aef50f07b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var map = new L.Map('map_canvas', { | |
center: [0,0], | |
zoom: 2 | |
}); | |
// add a nice baselayer from Stamen | |
L.tileLayer('http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png', { | |
attribution: 'Stamen' | |
}).addTo(map); | |
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