-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgmap.html
43 lines (37 loc) · 976 Bytes
/
gmap.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
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html, body { height: 100%; margin: 0; padding: 0; }
#map { height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript">
var map;
var geocoder;
var marker;
function initMap() {
map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 30.3077609, lng: -97.7534014},
zoom: 11
});
geocoder = new google.maps.Geocoder();
geocoder.geocode( { 'address' : '4002 West Lake Drive Austin TX'},
function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
marker = new google.maps.Marker({
position: results[0].geometry.location,
map: map,
title: 'hello'
});
}
})
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDtyGty6pjpKrzVu8Jz-0y4xWNxm49U73A&callback=initMap">
</script>
</body>
</html>