Skip to content

Instantly share code, notes, and snippets.

@jsanz
Last active August 29, 2015 14:22
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 jsanz/b375264f5d7b94d7eeb8 to your computer and use it in GitHub Desktop.
Save jsanz/b375264f5d7b94d7eeb8 to your computer and use it in GitHub Desktop.
CartoDB.js examples: minimal

Examples on using CartoDB.js.

Minimal example on calling a VizJSON

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Ejemplos IGN</title>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html, body, #map {
height: 100%;
padding: 0;
margin: 0;
}
</style>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.14/themes/css/cartodb.css" />
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.14/cartodb.js"></script>
</head>
<body>
<div id="map"></div>
<script>
$( document ).ready(function() {
var viz = 'https://ignspaintest.cartodb.com/api/v2/viz/2d215c0c-08ff-11e5-9e8a-0e018d66dc29/viz.json';
cartodb.createVis('map',viz);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment