-
Notifications
You must be signed in to change notification settings - Fork 0
/
locations.html
47 lines (45 loc) · 1.16 KB
/
locations.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
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>News Distribution</title>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
#map {
height: 100%;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
center: {lat: -1.2920659, lng: 36.8219462},
zoom: 6
});
var location = {lat: -4.0434771, lng: 39.6682065};
var contentString = "<div><h2>This is an article from Mombasa</h2></div>";
var infowindow = new google.maps.InfoWindow({
content: contentString,
maxWidth: 250
});
var marker = new google.maps.Marker({
position: location,
map: map,
title: 'Mombasa'
});
marker.addListener('click', function() {
infowindow.open(map, marker);
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDoS2frTqusjFyH_2Zlp8ATgwyWFXxQPZY&callback=initMap&signed_in=true" async defer>
</script>
</body>
</html>