Created
October 10, 2012 17:07
-
-
Save javisantana/3866966 to your computer and use it in GitHub Desktop.
new cartob.js interface
This file contains hidden or 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
function main() { | |
var map = L.map('map').setView([0, 0], 3); | |
L.tileLayer('http://a.tile.stamen.com/toner/{z}/{x}/{y}.png', { | |
attribution: 'stamen' | |
}).addTo(map); | |
cartodb.loadLayer(map, { | |
user: 'development', | |
table: 'clubbing', | |
}).on('done', function(layer) { | |
layer.on('featureOver', function(e, pos, latlng, feature_info) { | |
console.log(e, pos, latlng, feature_info); | |
}) | |
}).on('error', function() { | |
console.log("some error occurred"); | |
}); | |
} | |
document.body.onload = main; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment