-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path67_OverviewMapControl.html
54 lines (48 loc) · 1.33 KB
/
67_OverviewMapControl.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="ol.js"></script>
<link rel="stylesheet" href="ol.css">
<script
src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL">
</script>
</head>
<script>
// :
//기본 : Map View Source Layer
//추가 : control
</script>
<body>
<!-- 기본틀로 사용하는 양식 -->
<div id="map" class="map"></div>
<script>
var source = new ol.source.OSM();
var overviewMapControl = new ol.control.OverviewMap({
layers: [
new ol.layer.Tile({
source: source
})
]
});
var map = new ol.Map({
controls: ol.control.defaults().extend([
ol.control.overviewMapControl
]),
layers: [
new ol.layer.Tile({
source: source
})
],
target: 'map',
view: new ol.View({
center: [500000, 6000000],
zoom: 7
})
});
</script>
</body>
</html>