line-pattern webgl
nssang00 opened this issue · 3 comments
nssang00 commented
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?
ahocevar commented
ol-mapbox-style uses the Canvas 2D renderer. Support for line patterns is planned for the Canvas 2D renderer.
nssang00 commented
Is it possible to draw in the corresponding direction along a line on a 2D canvas?
ahocevar commented
Yes, using a transform and doing separate stroke() operations for each segment.