Last active
December 10, 2015 02:48
-
-
Save wboykinm/4370304 to your computer and use it in GitHub Desktop.
CartoDB runtime load
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>CartoDB Runtime</title> | |
<style> | |
html, body, #map { | |
height: 100%; | |
padding: 0; | |
margin: 0; | |
} | |
</style> | |
<link rel="stylesheet" href="http://geosprocket.com/assets/leaflet/dist/leaflet.css" /> | |
<!--[if lte IE 8]><link rel="stylesheet" href="http://geosprocket.com/assets/leaflet/dist/leaflet.ie.css" /><![endif]--> | |
</head> | |
<body> | |
<div id="map"></div> | |
</body> | |
<script src="http://libs.cartocdn.com/cartodb.js/v2/cartodb.js"></script> | |
<script> | |
function main() { | |
map = new L.Map('map', { | |
center: [34.885,-3.032], | |
zoom: 8 | |
}) | |
cartodb.loadLayer(map, { | |
type: 'cartodb', | |
options: { | |
table: 'ag_2011_commune3', | |
user_name: 'dai' | |
query: 'select * from ag_2011_commune3' | |
} | |
}) | |
} | |
window.onload = main; | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment