Skip to content

Commit

Permalink
fix empty mapcss text tooltip to show up on compacted features
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Oct 9, 2023
1 parent 5abc05e commit fd67689
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions js/GeoJsonNoVanish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class GeoJsonNoVanish extends L.GeoJSON {
if (d > Math.pow(this.threshold, 2) || is_max_zoom) {
delete o.obj.placeholder;
this.removeLayer(o);
o.obj.bindTooltip(o._tooltip);
if (o._tooltip) {
o.obj.bindTooltip(o._tooltip);
}
this.addLayer(o.obj);
}
return;
Expand Down Expand Up @@ -67,7 +69,9 @@ class GeoJsonNoVanish extends L.GeoJSON {
c.options.interactive = true;
c.options.stroke = true;
c.options.fill = true;
c.bindTooltip(o._tooltip);
if (o._tooltip) {
c.bindTooltip(o._tooltip);
}
this.addLayer(c);
}, this);
}
Expand Down

0 comments on commit fd67689

Please sign in to comment.