-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGoogleMapsExample.html
More file actions
executable file
·51 lines (42 loc) · 993 Bytes
/
GoogleMapsExample.html
File metadata and controls
executable file
·51 lines (42 loc) · 993 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
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html>
<head>
<script
src="http://maps.googleapis.com/maps/api/js">
</script>
<script>
var x=new google.maps.LatLng(52.395715,4.888916);
var stavanger=new google.maps.LatLng(50.983991,-100.734863);
var amsterdam=new google.maps.LatLng(52.395715,4.888916);
var london=new google.maps.LatLng(51.508742,-0.120850);
function initialize()
{
var mapProp = {
center:x,
zoom:4,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
var arrow = {
path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW
};
var myTrip=[london, stavanger];
var flightPath=new google.maps.Polyline({
path:myTrip,
icons: [{
icon: arrow
}],
strokeColor:"#0000FF",
strokeOpacity:1,
strokeWeight:4,
geodesic:true
});
flightPath.setMap(map);
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="googleMap" style="width:500px;height:380px;"></div>
</body>
</html>