Open nssang00 opened 11 months ago
ol-mapbox-style uses the Canvas 2D renderer. Support for line patterns is planned for the Canvas 2D renderer.
Is it possible to draw in the corresponding direction along a line on a 2D canvas?
Yes, using a transform and doing separate stroke() operations for each segment.
Since line-pattern is not supported, I personally used createPattern (https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern), but the problem was that the image was not drawn along the line.
However, I confirmed that the line pattern is drawn normally in the webgl version (https://openlayers.org/en/latest/examples/webgl-draw-line.html). Are you planning to support ol-mapbox-gl webgl version?