-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmobileview.html
76 lines (68 loc) · 3.18 KB
/
mobileview.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
<!DOCTYPE html>
<html>
<head lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Leaflet Geonames Search Control</title>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/1.1.0/leaflet.css">
<link rel="stylesheet" href="../L.Control.Geonames.css">
<style>
#Nav li {
display: inline;
margin-left: 10px;
}
</style>
</head>
<body class="">
<script src="//cdnjs.cloudflare.com/ajax/libs/leaflet/1.1.0/leaflet.js"></script>
<script src="../L.Control.Geonames.js"></script>
<div>
<h2 style="float:left;margin:0;">Mobile Geonames Example</h2>
<ul id="Nav" style="float:right;list-style-type:none; margin:0;padding:0;">
<li>
<b>Other examples:</b>
</li>
<li>
<a href="adminCodes.html">Admin Codes</a>
</li>
<li>
<a href="bbox.html">Bounding Box</a>
</li>
<li>
<a href="locale.html">Locale</a>
</li>
<li>
<a href="events.html">Events</a>
</li>
<li>
<a href="postCodes.html">Postal Codes</a>
</li>
</ul>
</div>
<div id="map" style="position: absolute; top: 3em; left: 0px; bottom: 0px; right: 0px; border-top: 2px solid rgb(85, 85, 85);"
class="leaflet-container leaflet-touch leaflet-fade-anim leaflet-grab leaflet-touch-drag leaflet-touch-zoom" tabindex="0">
<div class="leaflet-pane leaflet-map-pane" style="transform: translate3d(-257px, 0px, 0px);">
<div class="leaflet-pane leaflet-tile-pane">
<div class="leaflet-layer " style="z-index: 1; opacity: 1;">
<div class="leaflet-tile-container leaflet-zoom-animated" style="z-index: 9; transform: translate3d(1px, -1px, 0px) scale(2);"></div>
<script>
var map = L.map("map", {
attributionControl: false,
zoomControl: false // hide zoom buttons in mobile view
}).setView([44.07, -118.78], 6);
L.tileLayer('//{s}.tile.stamen.com/toner-lite/{z}/{x}/{y}.png', {
attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
subdomains: 'abcd',
maxZoom: 10,
minZoom: 2
}).addTo(map);
L.control.geonames({
username: 'cbi.test',
position: 'topcenter',
showPopup: false,
alwaysOpen: true,
maxresults: 3
}).addTo(map);
</script>
</body>
</html>