maps-theme/assets/content/script.js

18 lines
538 B
JavaScript
Raw Permalink Normal View History

2023-06-20 18:34:36 +00:00
function initMap() {
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 8,
center: { lat: parseFloat(item.location.lat), lng: parseFloat(item.location.lng) },
streetViewControl: false,
mapTypeControl: false,
fullscreenControl: false,
});
new google.maps.Marker({
position: { lat: parseFloat(item.location.lat), lng: parseFloat(item.location.lng) },
map: map,
title: item.title,
optimized: false,
});
}
window.initMap = initMap;