30 lines
490 B
JavaScript
30 lines
490 B
JavaScript
function mp_init_map() {
|
|
|
|
/*
|
|
* following variable are created by mp_locations.php
|
|
* - let locations
|
|
* - let icon_url
|
|
*/
|
|
|
|
let map = new google.maps.Map(
|
|
document.getElementById("ljdp_map"),
|
|
{
|
|
zoom: 5,
|
|
disableDefaultUI: true,
|
|
center: locations[0],
|
|
}
|
|
);
|
|
let marker, icon;
|
|
icon = {
|
|
url: icon_url,
|
|
scaledSize: new google.maps.Size(35, 50)
|
|
};
|
|
for (loc of locations) {
|
|
marker = new google.maps.Marker({
|
|
position: loc,
|
|
map: map,
|
|
icon: icon,
|
|
});
|
|
};
|
|
}
|