-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
42 lines (41 loc) · 1.04 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Google map</title>
<style type="text/css" media="screen">
#map
{
width: 500px;
height: 300px;
}
</style>
</head>
<body>
<h3>My Google Maps Demo</h3>
<div id="map"></div>
<script>
function initMap() {
var rajkot = {lat: 22.303894, lng: 70.802160};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 10,
center: rajkot,
mapTypeId: google.maps.MapTypeId.HYBRID
});
var marker = new google.maps.Marker({
position: rajkot,
map: map
});
var infowindow = new google.maps.InfoWindow()
google.maps.event.addListener(marker, 'click', (function (marker) {
return function () {
infowindow.setContent('found');
infowindow.open(map, marker);
}
})(marker));
}
</script>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBblzn6iLRo10j7_yOwl98TnlHg7vSbVZ4&callback=initMap">
</script>
</body>
</html>