try fix show map

This commit is contained in:
Luiz Costa 2024-06-07 12:28:04 +01:00
parent b33a81c3bf
commit d044d0a28a

View File

@ -21,8 +21,8 @@ function create_dialog_and_init_map(frm) {
// Adjust the size of the dialog dynamically to 80% of the browser window
const modalContent = dialog.$wrapper.find('.modal-content');
modalContent.css("width", "80%");
modalContent.css("height", "80%");
modalContent.css("width", "80vw");
modalContent.css("height", "80vh");
modalContent.css("max-width", "none"); // Ensure no max-width restrictions
// Add hide event to reload the page when the dialog is closed
@ -93,7 +93,7 @@ function init_map(frm) {
},
callback: function (r) {
if (r.message) {
console.table(r.message);
//console.table(r.message);
const data = r.message;
const routeCoordinates = data.map(entry => [entry.latitude, entry.longitude]);
const polyline = window.L.polyline(routeCoordinates, { color: 'red' }).addTo(map);