3mapslab/Leaflet.streetlabels

Streetlabels mixes the offset done by Polyline Offset

dave-driesmans opened this issue · 1 comments

Describe the bug
We have a map where we want to display direction flows in the street. We use Polyline offset for that and that works fine.
As soon as we add the streetLabels Renderer it mixes the offset. Negative becomes positive for some.

Screenshots
Left with StreetLabels, right without
Screenshot 2022-03-30 at 16 18 59

Can anyone point me to a possible solution? Or where i should look in the code?

Ok, it's due to this

if (this._getBearing(startCoords, stopCoords) < 0) {
       layer = this._getLineStringReverse(layer);
}

When i leave it the lines aren't swapped. The text is up side down for some polylines but that's ok for the moment.