default map center to france

This commit is contained in:
lenovo
2022-11-01 21:18:44 +01:00
parent 3e002844b8
commit bd5d1715a0
2 changed files with 6 additions and 2 deletions

View File

@@ -7,12 +7,16 @@ function mp_init_map() {
* - let icon_size[x, y]
*/
// default map center to france
let map_center = {lat:46.227638, lng:2.213749};
if (locations.length > 0)
map_center = locations[0];
let map = new google.maps.Map(
document.getElementById("ljdp_map"),
{
zoom: 5,
disableDefaultUI: true,
center: locations[0],
center: map_center,
}
);
let marker, icon, label;