Reputation: 73
I would like to draw several paths from same coordinates on a leaflet.js
map. I have thought about making the gap between paths with trigonometric computations, but it's too complex to deal with teh zoom level, translate GPS coordinates to a vector, etc.
The drawing I have now is like this (another path is under the green path):
And I would like something like that:
Of course, the coordinates, angle and zoomlevel can change.
Upvotes: 2
Views: 2659
Reputation: 53185
You would probably be interested in Leaflet Polyline Offset plugin:
This plugin adds to Leaflet
Polyline
s the ability to be drawn with a relative pixel offset, without modifying their actualLatLng
s. The offset value can be either negative or positive, for left- or right-side offset, and remains constant across zoom levels.
Upvotes: 2