forked from abola/MyCrawlerExample
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeojson.html
More file actions
41 lines (38 loc) · 988 Bytes
/
geojson.html
File metadata and controls
41 lines (38 loc) · 988 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title>GeoJson 練習</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#map {
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var map;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
zoom: 9,
center: {lat: 25.047886, lng: 121.516950}
});
// Load GeoJSON.
map.data.loadGeoJson(
// 可輸入資料網址 或直接 輸入 GeoJson
"http://www.geologycloud.tw/data/zh-tw/liquefaction?area=%E8%87%BA%E5%8C%97&classify=%E9%AB%98%E6%BD%9B%E5%8B%A2&all=true"
//"http://128.199.204.20/pm25/geojson.php"
);
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?callback=initMap">
</script>
</body>
</html>