mv map_prof plugin inside plugins container

This commit is contained in:
asus
2024-02-06 15:47:28 +01:00
parent d8c03f1c59
commit 1b837f8f92
35 changed files with 2 additions and 1 deletions

View File

@@ -0,0 +1,41 @@
function restrict_map(restrict) {
let map_restriction = {
latLngBounds: g_world_bound,
strictBounds: true,
};
if (restrict)
g_map.setOptions({restriction: map_restriction,});
else
g_map.setOptions({restriction: null,});
};
function create_map(map_div) {
// default map center to france
let map_center = coordinates_default;
// map_center = {lat:-2.515748362923059, lng:32.93366215464864};
let map_restriction = {
latLngBounds: g_world_bound,
strictBounds: true,
};
let map_options = {
/* map options : https://developers.google.com/maps/documentation/javascript/reference/map#MapOptions */
disableDefaultUI: true,
zoomControl: true,
scaleControl: true,
zoom: map_zoom,
//gestureHandling: "cooperative",
gestureHandling: "greedy",
//gestureHandling: "none",
//gestureHandling: "auto",
//disableDoubleClickZoom: "false", // deprecated
//draggable: "true", // deprecated
center: map_center,
restriction: map_restriction,
}
return new google.maps.Map(map_div, map_options);
}