Skip to content

Instantly share code, notes, and snippets.

@wboykinm
Last active December 10, 2015 02:48
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 wboykinm/4370304 to your computer and use it in GitHub Desktop.
Save wboykinm/4370304 to your computer and use it in GitHub Desktop.
CartoDB runtime load
<!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