diff options
author | Markus Koch <markus@notsyncing.net> | 2020-04-20 18:00:37 +0200 |
---|---|---|
committer | Markus Koch <markus@notsyncing.net> | 2020-04-20 18:01:14 +0200 |
commit | 4c5f7f9a85cc1f6df248ac16c3e82bf27fe09786 (patch) | |
tree | 5a53608c4ab384cf89ae3e357b1f648a619c1a9b | |
parent | b9986f0b426ca37502d6f3bcbccc9c5e2cfc18ee (diff) | |
download | lifomapserver-4c5f7f9a85cc1f6df248ac16c3e82bf27fe09786.tar.gz lifomapserver-4c5f7f9a85cc1f6df248ac16c3e82bf27fe09786.tar.bz2 lifomapserver-4c5f7f9a85cc1f6df248ac16c3e82bf27fe09786.zip |
Do not show label on path for polygons
-rw-r--r-- | htdocs/leafletjs/Leaflet.streetlabels.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/htdocs/leafletjs/Leaflet.streetlabels.js b/htdocs/leafletjs/Leaflet.streetlabels.js index 1fb2754..724c585 100644 --- a/htdocs/leafletjs/Leaflet.streetlabels.js +++ b/htdocs/leafletjs/Leaflet.streetlabels.js @@ -117,8 +117,7 @@ L.StreetLabels = L.LabelTextCollision var textLength = ctx.measureText(layerText).width; ctx.strokeText(layerText, p.x + offsetX - textLength / 2, p.y + offsetY); ctx.fillText(layerText, p.x + offsetX - textLength / 2, p.y + offsetY); - } - if (layer instanceof L.Polyline) { + } else if (layer instanceof L.Polyline) { /** * Render text alongside the polyline * **/ |