-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathnlsc.html
51 lines (46 loc) · 1.5 KB
/
nlsc.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
<html>
<head>
<title>NLSC</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/nlsc.js"></script>
<style>
#map { height: 100%; width:100% }
</style>
</head>
<body>
<div id="map"></div>
<script>
var osm = new L.OSM.Mapnik();
var nlscmaps = [
// new L.NLSC.PHOTO2({opacity: 0.7}),
new L.NLSC.B5000({opacity: 0.7}),
new L.NLSC.MB5000({opacity: 0.7}),
new L.NLSC.EMAP0({opacity: 0.7}),
new L.NLSC.EMAP1({opacity: 0.7}),
new L.NLSC.EMAP2({opacity: 0.7}),
new L.NLSC.EMAP({opacity: 0.7}),
new L.NLSC.LANDSECT({opacity: 0.7}),
new L.NLSC.Village({opacity: 0.7}),
new L.NLSC.LUIMAP({opacity: 0.7}),
];
var baseMaps = {};
baseMaps["開放街圖"] = osm;
baseMaps["正射影像圖(通用版)"] = new L.NLSC.PHOTO2({opacity: 1});
var overlayMaps = {};
for (var i in nlscmaps) {
overlayMaps[nlscmaps[i].name] = nlscmaps[i];
}
// set up the map
var map = new L.Map('map', {
center: new L.LatLng( 25.03738, 121.56351 ),
zoom: 17,
layers: [baseMaps["正射影像圖(通用版)"], overlayMaps["通用版電子地圖透明"]],
} )
.addControl(new L.Control.Scale())
.addControl(new L.Control.Layers(baseMaps, overlayMaps));
</script>
</body>
</html>