This repository has been archived by the owner on Jul 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html~
73 lines (67 loc) · 2.25 KB
/
index.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<head>
<link rel="stylesheet" type="text/css" href="cartodb.css"-->
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" -->
<link rel="stylesheet" type="text/css" href="my.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="https://raw.github.com/Vizzuality/cartodb-gmapsv3/gh-pages/cartodb-gmapsv3.js"></script>
<script type="text/javascript" src="https://raw.github.com/Vizzuality/cartodb-gmapsv3/gh-pages/wax.g.js"></script>
<script type="text/javascript" src="js/init.js">
</script>
<script type="text/javascript">
var map, trails, beaches, oahu, center, loc, island, data;
function initialize() {
$.getJSON({
url: "http://user.cartodb.com/api/v1/sql?q=SELECT * FROM table_name",
datatype: 'json',
data: data,
success: null
});
function toggle(obj){
if (loc) loc.className='';
obj.className='selected';
loc=obj;
//get tab selected
var zoom = $("li").filter(".selected").text();
switch(zoom)
{
case "Oahu":
map.setZoom(10);
map.panTo(oahu);
break;
case "All Islands":
map.setZoom(7);
map.panTo(center);
break;
}
}
alert(data);
}
</script>
</head>
<body onload="initialize()"
<div id="wrapper">
<div id="h">
<h4>Outdoors Hawaii</h4>
<ul id="locs">
<li onclick="toggle(this)">All Islands</li>
<li onclick="toggle(this)">Oahu</li>
<li onclick="toggle(this)">Kauai</li>
<li onclick="toggle(this)">Big Island</li>
<li onclick="toggle(this)">Maui</li>
</ul>
</div>
<div id="sidebar">
<ul>
<script type="text/javascript">
for(i=0; i<10; i++)
document.write("<li>List Item " + i + "</li>");
</script>
</ul>
</div>
<div id="map_canvas"></div>
<div id="info"></div>
</div>
</body>
</html>