-
Notifications
You must be signed in to change notification settings - Fork 0
/
GeoLocationActual.html
48 lines (41 loc) · 1.24 KB
/
GeoLocationActual.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
44
45
46
47
48
<html>
<head>
<title>Google Map</title>
<meta name="viewport" content="initial-scale=1.0">
<meta charset="utf-8">
<style>
#map {
height: 300px;
width: 600px;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
</head>
<body>
<div style="padding:10px">
<div id="map"></div>
</div>
<script type="text/javascript">
var map;
function initMap() {
var latitude = 27.7172453; // YOUR LATITUDE VALUE
var longitude = 85.3239605; // YOUR LONGITUDE VALUE
var myLatLng = {lat: latitude, lng: longitude};
map = new google.maps.Map(document.getElementById('map'), {
center: myLatLng,
zoom: 14
});
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
//title: 'Hello World'
// setting latitude & longitude as title of the marker
// title is shown when you hover over the marker
title: latitude + ', ' + longitude
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB3ovdh6Qae5FWPMPpfS5X02JLbqpc2n8U&libraries=places&callback=initMap"
async defer></script>
</body>
</html>