You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im using the native Leaflet filtering (Layer Groups and Layers Control): https://leafletjs.com/examples/layers-control/
When I hide/show the different groups, the marker list it's not updating. How can I achieve this?
I've also tried this with the demo-project for this plugin - same results as in my project.
I've made a function that checks if each filter is checked of that helps: let checkboxTest = document.querySelectorAll('.leaflet-control-layers-selector'); for(let i = 0; i < checkboxTest.length; i++) { checkboxTest[i].addEventListener('change', function(){ console.log(checkboxTest[i].parentElement.textContent + ' is: ' + checkboxTest[i].checked); }); }
Here is my Layer control:
`
const overLayMap = {
'Group A': groupA,
'Group B': groupB,
};
Im using the native Leaflet filtering (Layer Groups and Layers Control): https://leafletjs.com/examples/layers-control/
When I hide/show the different groups, the marker list it's not updating. How can I achieve this?
I've also tried this with the demo-project for this plugin - same results as in my project.
I've made a function that checks if each filter is checked of that helps:
let checkboxTest = document.querySelectorAll('.leaflet-control-layers-selector'); for(let i = 0; i < checkboxTest.length; i++) { checkboxTest[i].addEventListener('change', function(){ console.log(checkboxTest[i].parentElement.textContent + ' is: ' + checkboxTest[i].checked); }); }
Here is my Layer control:
`
const overLayMap = {
'Group A': groupA,
'Group B': groupB,
};
`
The text was updated successfully, but these errors were encountered: