terra-draw
terra-draw copied to clipboard
[Feature Request] Dashed Lines and Outline Styling
This was originally raised in #38 but raising as a separate issue to more easily track it.
The purposed of this issue is to explore how viable it would be to support dash lines and outlines across mapping libraries. There is a somewhat philosophical question of if we we provide a fall back to a normal line if it is not supported and if we should have 'best effort' features in Terra Draw to allow support for more complex options.
I started looking into this - I got this working with Leaflet, OpenLayers and Mapbox, but for MapLibre it is only possible to hardcode the dash array styling as a literal value (i.e. it cannot be driven by data/properties).
See https://github.com/maplibre/maplibre-gl-js/issues/1235 for more details.
In theory we could push this forward without MapLibre support, but it feels weird to have one piece of styling functionality which does not work for one adapter. The other option is we do support MapLibre for dash lines but the value would be hardcoded to say [1, 1] and changing the styling property would not change it.
If people have thoughts on this I would be open to hearing them about what might be there preference?
It looks like https://github.com/maplibre/maplibre-gl-js/issues/1235 has been picked up under it's bounty programme. Hoping we might be able to achieve this at some point next year!
Still no movement on this since it was picked up on the bounty programme. I will continue to keep an eye open!