summaryrefslogtreecommitdiff
path: root/htdocs/leafletjs
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/leafletjs')
-rw-r--r--htdocs/leafletjs/Leaflet.streetlabels.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/htdocs/leafletjs/Leaflet.streetlabels.js b/htdocs/leafletjs/Leaflet.streetlabels.js
index 5342bea..864f791 100644
--- a/htdocs/leafletjs/Leaflet.streetlabels.js
+++ b/htdocs/leafletjs/Leaflet.streetlabels.js
@@ -94,7 +94,7 @@ L.StreetLabels = L.LabelTextCollision
L.point(p.x + offsetX, p.y + offsetY), L.point(
textWidth, textHeight));
- if (this.options.collisionFlg) {
+ if (this._getCollisionFlag(layer)) {
for (var index in this._textList) {
var pointBounds = this._textList[index];
if (pointBounds.intersects(bounds)) {
@@ -105,7 +105,6 @@ L.StreetLabels = L.LabelTextCollision
this._textList.push(bounds);
-
ctx.fillStyle = this.options.fontStyle.fillStyle;
ctx.strokeStyle = this.options.fontStyle.strokeStyle;
@@ -143,6 +142,10 @@ L.StreetLabels = L.LabelTextCollision
}
},
+ _getCollisionFlag: function (layer) {
+ return this.options.collisionFlg;
+ },
+
/***
* Returns the bearing in degrees clockwise from north (0 degrees)
from the first L.LatLng to the second, at the first LatLng