-
Notifications
You must be signed in to change notification settings - Fork 5
/
rchss-chiayi.html
44 lines (40 loc) · 1.47 KB
/
rchss-chiayi.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
<html>
<head>
<title>嘉義百年地圖</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.2/leaflet.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="./leaflet-osm.js"></script>
<script src="../lib/rchss.js"></script>
<style>
#map { height: 100%; width:100% }
</style>
</head>
<body>
<div id="map"></div>
<script>
var osm = new L.OSM.Mapnik(),
chiayi1900 = new L.RCHSS.Chiayi1900({opacity: 0.7}),
chiayi1909 = new L.RCHSS.Chiayi1909({opacity: 0.7}),
chiayi1931 = new L.RCHSS.Chiayi1931({opacity: 0.7}),
chiayi1932 = new L.RCHSS.Chiayi1932({opacity: 0.7}),
chiayi1936 = new L.RCHSS.Chiayi1936({opacity: 0.7}),
chiayi_12K_1926 = new L.RCHSS.Chiayi_12K_1926({opacity: 0.7});
var overlayMaps = {};
overlayMaps[chiayi1900.name] = chiayi1900;
overlayMaps[chiayi1900.name] = chiayi1909;
overlayMaps[chiayi1931.name] = chiayi1931;
overlayMaps[chiayi1932.name] = chiayi1932;
overlayMaps[chiayi1936.name] = chiayi1936;
overlayMaps[chiayi_12K_1926.name] = chiayi_12K_1926;
// set up the map
var map = new L.Map('map', {
center: new L.LatLng( 23.48050, 120.45328 ),
zoom: 15,
layers: [osm, chiayi1931],
} )
.addControl(new L.Control.Scale())
.addControl(new L.Control.Layers({"開放街圖": osm}, overlayMaps));
</script>
</body>
</html>