Various small fixes

This commit is contained in:
Pieter Vander Vennet 2020-09-17 13:13:02 +02:00
parent 1ea285d303
commit 2dd428497e
45 changed files with 776 additions and 587 deletions

View file

@ -221,7 +221,7 @@ export class FilteredLayer {
color: style.color
});
} else if (style.icon.iconUrl.startsWith("$circle ")) {
} else if (style.icon.iconUrl.startsWith("$circle")) {
marker = L.circle(latLng, {
radius: 25,
color: style.color

View file

@ -106,23 +106,18 @@ export class Tag extends TagsFilter {
}
matches(tags: { k: string; v: string }[]): boolean {
if (this.value === "") {
return true
}
for (const tag of tags) {
if (this.key == tag.k) {
if (tag.v === "") {
// This tag has been removed -> always matches false
return false;
}
if (this.value === tag.v) {
return true;
}
return this.value === tag.v;
}
}
// The tag was not found
if(this.value === ""){
// and it shouldn't be found!
return true;
}
return false;
}