Hi there and welcome to the Community, @AdRod
- To disable map zoom when scrolling, please add the code below to the Custom JS field on the Settings tab of your widget’s settings:
const waitForElement = (selector, root = document) => new Promise(res => {
let i = 0;
const check = () => {
const component = root.querySelector(selector);
if (component) {
res(component);
} else if (i !== 50) {
setTimeout(check, 100);
i++;
}
};
check();
});
waitForElement("[class*='maplibregl-canvas-container']")
.then(() => {
const scrollElement = document.querySelector("[class*='maplibregl-canvas-container']");
scrollElement.addEventListener('wheel', (event) => {
event.stopImmediatePropagation();
}, true);
scrollElement.addEventListener('touchstart', (event) => {
event.stopImmediatePropagation();
}, true);
scrollElement.addEventListener('mousedown', (event) => {
event.stopImmediatePropagation();
}, true);
scrollElement.addEventListener('dblclick', (event) => {
event.stopImmediatePropagation();
}, true);
});
-
Unfortunately, it’s impossible to move the focus to the previous position after closing the location popup. I’ve added this idea to the Wishlist on your behalf and if it gets more votes, we’ll try to think about it in the future
- Move map focus to the previous position after closing the location popup
-
Do you mean these yellow lines? If this is the case, you can change their style using the Map Color Scheme on the Style tab:
Please try it out and let me know if it works for your case