-
Notifications
You must be signed in to change notification settings - Fork 6.7k
/
google-map-demo.html
128 lines (116 loc) · 3.83 KB
/
google-map-demo.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<div class="demo-google-map">
<google-map height="400px"
width="750px"
[center]="center"
[zoom]="zoom"
(mapClick)="handleClick($event)"
(mapMousemove)="handleMove($event)"
(mapRightclick)="handleRightclick()"
[mapTypeId]="mapTypeId">
<map-marker
#firstMarker="mapMarker"
[position]="center"
(mapClick)="clickMarker(firstMarker)"></map-marker>
<map-marker #marker="mapMarker"
*ngFor="let markerPosition of markerPositions"
[position]="markerPosition"
[options]="markerOptions"
(mapClick)="clickMarker(marker)"></map-marker>
<map-info-window>Testing 1 2 3</map-info-window>
<map-polyline *ngIf="isPolylineDisplayed" [options]="polylineOptions"></map-polyline>
<map-polygon *ngIf="isPolygonDisplayed" [options]="polygonOptions"></map-polygon>
<map-rectangle *ngIf="isRectangleDisplayed" [options]="rectangleOptions"></map-rectangle>
<map-circle *ngIf="isCircleDisplayed" [options]="circleOptions"></map-circle>
<map-ground-overlay *ngIf="isGroundOverlayDisplayed"
[url]="groundOverlayUrl"
[bounds]="groundOverlayBounds"></map-ground-overlay>
<map-kml-layer *ngIf="isKmlLayerDisplayed"
[url]="demoKml"></map-kml-layer>
</google-map>
<p><label>Latitude:</label> {{display?.lat}}</p>
<p><label>Longitude:</label> {{display?.lng}}</p>
<div>
<label for="map-type">
Select map type
<select id="map-type" (change)="mapTypeChanged($event)" #mapType>
<option *ngFor="let type of mapTypeIds" [value]="type">{{type}}</option>
</select>
</label>
</div>
<div>
<label for="polyline-checkbox">
Toggle Polyline
<input type="checkbox" (click)="togglePolylineDisplay()">
</label>
</div>
<div>
<label for="editable-polyline-checkbox">
Toggle Editable Polyline
<input type="checkbox"
[disabled]="!isPolylineDisplayed"
(click)="toggleEditablePolyline()">
</label>
</div>
<div>
<label for="polygon-checkbox">
Toggle Polygon
<input type="checkbox" (click)="togglePolygonDisplay()">
</label>
</div>
<div>
<label for="editable-polygon-checkbox">
Toggle Editable Polygon
<input type="checkbox"
[disabled]="!isPolygonDisplayed"
(click)="toggleEditablePolygon()">
</label>
</div>
<div>
<label for="rectangle-checkbox">
Toggle Rectangle
<input type="checkbox" (click)="toggleRectangleDisplay()">
</label>
</div>
<div>
<label for="editable-rectangle-checkbox">
Toggle Editable Rectangle
<input type="checkbox"
[disabled]="!isRectangleDisplayed"
(click)="toggleEditableRectangle()">
</label>
</div>
<div>
<label for="circle-checkbox">
Toggle Circle
<input type="checkbox" (click)="toggleCircleDisplay()">
</label>
</div>
<div>
<label for="editable-circle-checkbox">
Toggle Editable Circle
<input type="checkbox" [disabled]="!isCircleDisplayed" (click)="toggleEditableCircle()">
</label>
</div>
<div>
<label for="ground-overlay-checkbox">
Toggle Ground Overlay
<input type="checkbox" (click)="toggleGroundOverlayDisplay()">
</label>
</div>
<div>
<label for="ground-overlay-image">
Ground Overlay image
<select id="ground-overlay-image" (change)="groundOverlayUrlChanged($event)">
<option
*ngFor="let image of groundOverlayImages"
[value]="image.url">{{image.title}}</option>
</select>
</label>
</div>
<div>
<label for="kml-layer-checkbox">
Toggle KML Layer
<input type="checkbox" (click)="toggleKmlLayerDisplay()">
</label>
</div>
</div>