When plotting traffic information on a map, each road has two directions. The road itself is often a single path, but the directions are actually two paths on the same road (with opposite directions). Via Leaflet there is an offset plugin to offset the lines a few pixels (indpendent of zoom level). That enables the two paths on the same road to always be shown in parallel (next to each other). An example of how I used that with Leaflet (using R Shiny) is here:
https://services.maptm.nl/tvdemo/?place=groningen
move the slider on the top left to 1 (instead of 0.5) to show all traffic and not only congested traffic and clearly see the offset at work for the lines/paths shown
The deck.gl solution also has such an offset feature as documented here:
Path Sytle Extension
I believe the dash
option of the same extention was implemented last year into Mapdeck:
Dash feature announcement on twitter
Since the offset function is similar to the dash function, I would think it is relatively straightforward to add that as well, but I'm no expert at this.
It would be great if adding the path offset option can be added. I would like to switch to Mapdeck instead of Leaflet because of the performance and the offset option is critical for the application.
TODO
width_*
argumentsoffset
argumentRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4