Examples on using CartoDB.js.
Minimal example on calling a VizJSON
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> |