Do not show label on path for polygons

This commit is contained in:
Markus Koch 2020-04-20 18:00:37 +02:00
parent b9986f0b42
commit 4c5f7f9a85

View File

@ -117,8 +117,7 @@ L.StreetLabels = L.LabelTextCollision
var textLength = ctx.measureText(layerText).width; var textLength = ctx.measureText(layerText).width;
ctx.strokeText(layerText, p.x + offsetX - textLength / 2, p.y + offsetY); ctx.strokeText(layerText, p.x + offsetX - textLength / 2, p.y + offsetY);
ctx.fillText(layerText, p.x + offsetX - textLength / 2, p.y + offsetY); ctx.fillText(layerText, p.x + offsetX - textLength / 2, p.y + offsetY);
} } else if (layer instanceof L.Polyline) {
if (layer instanceof L.Polyline) {
/** /**
* Render text alongside the polyline * Render text alongside the polyline
* **/ * **/