-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmarker.html
41 lines (38 loc) · 1.07 KB
/
marker.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Simple markers</title>
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
padding: 0px
}
</style>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
<script src="http://maps.googleapis.com/maps/api/geocode/json?address=1777+Frances+Street,+Vancouver,+BC&sensor=false"></script>
<script>
function initialize() {
var myLatlng = new google.maps.LatLng(49.2794056,-123.0684369);
var mapOptions = {
zoom: 12,
center: myLatlng
}
var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
var marker = new google.maps.Marker({
draggable: true,
animation: google.maps.Animation.DROP,
position: myLatlng,
map: map,
title: 'Hello World!'
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>
<body>
<div id="map-canvas"></div>
</body>
</html>