JSFiddle - React, Tailwind, and code Playground
HTML
<div id="map"></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
CSS
#map {
height: 100%;
}
html, body {
height: 100%;
margin: 0;
padding: 0;
}
JavaScript
var citymap = {
antwerpen: {
//center: {lat: 51.22131939707599, lng: 4.399144649505615},
center: {lat: 51.219448, lng: 4.402464},
radius: 28000,
color: '#FF0000'
},
sintniklaas: {
//center: {lat: 51.16471889365012, lng: 4.139378070831299},
center: {lat: 51.155884, lng: 4.154441},
radius: 41000,
color: '#00FF00'
},
hasselt: {
//center: {lat: 50.93105583426365, lng: 5.336930751800537},
center: {lat: 50.930690, lng: 5.332480},
radius: 85000,
color: '#0000FF'
},
brugge: {
//center: {lat: 51.208335264580036, lng: 3.227062225341797},
center: {lat: 51.209348, lng: 3.224700},
radius: 91000,
color: '#00AAAA'
},
essen: {
center: {lat: 51.4643684068504, lng: 4.473130702972412},
//center: {lat: 51.467760, lng: 4.468440},
radius: 500,
color: '#000000'
},
};
$( document ).ready(function() {
// Create the map.
var myLatLng = {lat: 51.4677662, lng: 4.4684089};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: myLatLng,
mapTypeId: 'terrain'
});
var infowindow = new google.maps.InfoWindow({
content: "Café In den Toren",
//pixelOffset: new google.maps.Size(0,100)
});
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
});
//infowindow.open(map,marker);
// Construct the circle for each value in citymap.
// Note: We scale the area of the circle based on the population.
for (var city in citymap) {
// Add the circle for this city to the map.
var cityCircle = new google.maps.Circle({
strokeColor: citymap[city].color,
strokeOpacity:...