Use a dropdown if there are a lot of options to choose from in tagrenderingquestion

This commit is contained in:
Pieter Vander Vennet 2021-06-18 01:50:03 +02:00
parent 1609c63f3b
commit 55f03c3de7
2 changed files with 59 additions and 20 deletions

View file

@ -159,7 +159,12 @@ export default class ShowDataLayer {
return;
}
if (selected.properties.id === feature.properties.id) {
leafletLayer.openPopup()
// A small sanity check to prevent infinite loops:
// If a feature is rendered both as way and as point, opening one popup might trigger the other to open, which might trigger the one to open again
if(selected.geometry.type === feature.geometry.type){
leafletLayer.openPopup()
}
}
})