1

My use case:

Single polyline is tagged with multiple lanes containing also a cycle lane.

How would I go about visualizing them side by side using Leaflet? Polyline is a set of GPS coordinates and I would like to have e.g. 3 polylines drawn where there is lane, lane, cycle lane.

I understand some kind of offsetting is required, but how do I go about calculating the offsetted GPS coordinates?

Any tips on plugins, algorithms, code examples are welcome. Since I am using Javascript, JS examples are preferred, but I can work with other languages as well.

2
  • 2
    Have you tried this yet overlapping polylines looks pretty straightforward BusLines
    – Areu
    Commented Sep 11, 2022 at 3:52
  • 1
    Thanks for your help, that should work. I am going to test it. I see you haven't added this as an answer, bounty could be yours otherwise.
    – dusoft
    Commented Sep 20, 2022 at 15:15

1 Answer 1

1

Here, this sould work Displaying overlapping polyline segments as multiple lines with offsets

also an example Bus Lines

Not the answer you're looking for? Browse other questions tagged or ask your own question.