Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placing images along line with "symbol-placement": "line" #230

Closed
kevin-rty opened this issue Aug 13, 2019 · 9 comments
Closed

Placing images along line with "symbol-placement": "line" #230

kevin-rty opened this issue Aug 13, 2019 · 9 comments

Comments

@kevin-rty
Copy link

Is the layout property "symbol-placement" to place icon images along a line supported? With "symbol-placement" set to line, I only get a symbol placed at the midpoint of the line.

example of my basic "symbol" layer type:

{ "id": "dir", "type": "symbol", "source": "test", "source-layer": "this-layer-to-test", "minzoom": 12, "layout": { "icon-image": "arrow", "icon-rotation-alignment": "map", "symbol-avoid-edges": false, "symbol-spacing": 10, "icon-allow-overlap": false, "icon-size": 0.7, "icon-padding": 2, "icon-rotate": 90, "symbol-placement": "line" }, "interactive": true }

Regards,

Kevin

@ahocevar
Copy link
Member

The interesting part in your style is the symbol-spacing property, which is not (yet) supported by ol-mapbox-style. According to the spec, your style would render the symbol along the line every 10 pixels, but due to the missing symbol-spacing support, ol-mapbox-style only renders it once at an anchor near the midoint of the line.

@kevin-rty
Copy link
Author

Thank you for the insight.

just out of interest: Are there any intention to integrate this layout property in the (near) future?

@ahocevar
Copy link
Member

@kbbaker I'd like to add it, but it would be a quite involved change. If development could be funded in some way, it is likely that it can happen in the near future. Would you be interested in providing some funding? As an alternative, we'd also accept pull requests with the necessary changes, and I could provide some guidance.

@kevin-rty
Copy link
Author

kevin-rty commented Aug 14, 2019

Funding is certainly an option if this helps development of the current implementation of the style specifications. How would this funding approach work and do you have an estimation of cost? Helping the development through a pull request could also be an option. Do you have pointers on where the adjustments should be made? I presume in the stylefunction.js?

@ahocevar
Copy link
Member

This would be quite an involved change, with changes to stylefunction.js in this library, and the way we determine suitable subsets of a linestring for rendering in the OpenLayers core library. Including tests and performance optimizations, this can easily take up a week of full-time work.

@jeff3780
Copy link

@ahocevar , did support for symbol-spacing property ever get added to ol-mapbox-style? I am trying to increase the density of road labels as one zooms in. This is for a vector tiles source rendered with OpenLayers using a Mapbox style specification through ol-mapbox-style. I found this thread while troubleshooting why changes in that particular setting are not reflected on the map even though changes to other settings in the same layout section can be seen. Therefore I wanted to confirm if symbol-setting support is still in a backlog. Thanks very much

@ahocevar
Copy link
Member

No, this has not been added (yet).

@aprinslo1
Copy link

Do we understand the effort to make the text symbol-placement frequency change. Who do we contact to get an estimate?

@ahocevar
Copy link
Member

symbol-spacing was implemented with #768.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants