-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGoogleMapWithMarker.html
More file actions
38 lines (37 loc) · 1.37 KB
/
GoogleMapWithMarker.html
File metadata and controls
38 lines (37 loc) · 1.37 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Google Map with Marker to your Website</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="UTF-8">
<style type="text/css">
#map {
height: 100%;
}
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<h3>Google Map with Marker Demo</h3>
<div id="map"></div>
<script type="text/javascript">
// initMap function initializes and adds map when the web page loads.
function initMap() {
var uluru = {lat: -25.363, lng: 131.044};
var map = new google.maps.Map(document.getElementById('map'), {
center: uluru, // center property tells API where to center the map
zoom: 4 // specifies zoom level for map
});
var marker = new google.maps.Marker({
position: uluru, // position property sets the position of the marker
map: map
});
}
</script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCgncHVhehCiKENUJB0y19GURax6WXqk&callback=initMap" async defer></script>
</body>
</html>