/
index.html
183 lines (155 loc) · 6.42 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="">
<title>Leaflet-Tabletop</title>
<!-- Bootstrap core CSS -->
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css" />
<!-- Custom styles for this template -->
<link href="http://getbootstrap.com/examples/navbar-fixed-top/navbar-fixed-top.css" rel="stylesheet">
<!-- Stylesheets for Leaflet.js -->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
<![endif]-->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js></script>
<![endif]-->
<style>
#map { height: 600px; width: 100%; position: absolute; padding-bottom:20px;}
#map2 { height: 600px; width: 100%; position: absolute; margin-top:620px;}
#map3 { height: 600px; width: 100%; position: absolute; margin-top:1240px;}
</style>
</head>
<body>
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Leaflet-Tabletop</a>
</div>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container">
<!-- Main component for a primary marketing message or call to action -->
<div class="jumbotron">
<h1>Leaflet-Tabletop</h1>
<p>Below are examples of basic Leaflet maps, also using Tabletop.js.</p>
<p>
<a class="btn btn-lg btn-primary" href="http://leafletjs.com/">View Fusion Tables docs »</a>
</p>
</div>
<div class="row">
<div class="col-lg-12">
<div id="map">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div id="map2">
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<div id="map3">
</div>
</div>
</div>
</div> <!-- /container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.0.0-rc1/js/bootstrap.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/holder/2.0/holder.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<script>
// are we on a small screen?
small = ($(document).width() < 480)
// create a map in the "map" div, set the view to a given place and zoom
map = L.map('map', {
scrollWheelZoom: false,
maxZoom: 16,
minZoom: 9,
//maxBounds: L.latLngBounds([40.5348,-89.6842],[42.9485,-86.3168])
}).setView([41.838299, -87.706953], 11);
// add an OpenStreetMap tile layer
L.tileLayer(
'http://{s}.tribapps.com/chicago-print/{z}/{x}/{y}.png', {
subdomains: ['maps1'],
attribution: 'Map data © <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
maxZoom: 16,
minZoom: 9
}).addTo(map);
// City limits mask
L.tileLayer(
"http://media.apps.chicagotribune.com/maptiles/chicago-mask/{z}/{x}/{y}.png",
{ maxZoom: 16, minZoom: 8, opacity: 0.5 }).addTo(map);
// add a marker in the given location, attach some popup content to it and open the popup
L.marker([41.890345, -87.623333]).addTo(map)
.bindPopup('Here is a popup at a zoomed out view. <br><strong> Easily customizable.</strong>')
.openPopup();
// Second map
map2 = L.map('map2', {
scrollWheelZoom: false,
maxZoom: 16,
minZoom: 9,
//maxBounds: L.latLngBounds([40.5348,-89.6842],[42.9485,-86.3168])
}).setView([41.890345, -87.623333], 15);
// add an OpenStreetMap tile layer
L.tileLayer(
'http://{s}.tribapps.com/chicago-print/{z}/{x}/{y}.png', {
subdomains: ['maps1'],
attribution: 'Map data © <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
maxZoom: 16,
minZoom: 9
}).addTo(map2);
// City limits mask
L.tileLayer(
"http://media.apps.chicagotribune.com/maptiles/chicago-mask/{z}/{x}/{y}.png",
{ maxZoom: 16, minZoom: 8, opacity: 0.5 }).addTo(map2);
// add a marker in the given location, attach some popup content to it and open the popup
L.marker([41.890345, -87.623333]).addTo(map2)
.bindPopup('A pretty popup when it is more zoomed in. <br><strong> Easily customizable.</strong>')
.openPopup();
// Third map, with open street tiles
map3 = L.map('map3', {
scrollWheelZoom: false,
maxZoom: 16,
minZoom: 9,
//maxBounds: L.latLngBounds([40.5348,-89.6842],[42.9485,-86.3168])
}).setView([40.820779, -96.696556], 15);
// add an OpenStreetMap tile layer
L.tileLayer(
'http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'Map data © <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',
maxZoom: 16,
minZoom: 9
}).addTo(map3);
// City limits mask
L.tileLayer(
"http://media.apps.chicagotribune.com/maptiles/chicago-mask/{z}/{x}/{y}.png",
{ maxZoom: 16, minZoom: 8, opacity: 0.5 }).addTo(map3);
// add a marker in the given location, attach some popup content to it and open the popup
L.marker([40.820779, -96.696556]).addTo(map3)
.bindPopup('Different street tiles. <br><strong> Easily customizable.</strong>')
.openPopup();
</script>
</body>
</html>