forked from CartoDB/carto.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayer_selector_overlay.html
57 lines (49 loc) · 1.43 KB
/
layer_selector_overlay.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!DOCTYPE html>
<html>
<head>
<title>Layer selector overlay example | CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
width:100%;
height: 100%;
padding: 0;
margin: 0;
}
</style>
<link rel="stylesheet" href="/themes/css/cartodb.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="/themes/css/cartodb.ie.css" />
<![endif]-->
</head>
<body>
<div id="map"></div>
<!-- include cartodb.js library -->
<script src="/dist/cartodb.js"></script>
<script>
function main() {
cartodb.createVis('map', 'http://development.localhost.lan:3000/api/v2/viz/1742e22e-cc67-11e2-8cdb-94942608096a/viz.json', {
shareable: true,
title: true,
description: true,
search: true,
tiles_loader: true,
layer_selector: true,
center_lat: 0,
center_lon: 0,
zoom: 2,
no_cdn: true
})
.error(function(err) {
console.log(err);
});
}
//window.onload = main;
var fn = function() { cartodb.load('../src/', main); }
window.onload = fn;
// $(document).ready(main);
</script>
</body>
</html>