<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDoLs4jh4_7ZW16LDVDAXDPGISWv9RN-x8&callback=initMap"
async defer></script>
<script>
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 9,
center: {lat: 49.802875, lng: 24.000163},
styles: [...]
});
setMarkers(map);
}
var beaches = [
['Sambir', 49.516293, 23.198340, 1]
];
function setMarkers(map) {
for (var i = 0; i < beaches.length; i++) {
var beach = beaches[i];
var marker = new google.maps.Marker({
position: {lat: beach[1], lng: beach[2]},
animation: google.maps.Animation.DROP,
map: map,
icon: '/marker.png'
});
}
}
</script>