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

Dynamic point icon symbology based on feature attributes #387

Open
jansule opened this issue Aug 2, 2021 · 7 comments
Open

Dynamic point icon symbology based on feature attributes #387

jansule opened this issue Aug 2, 2021 · 7 comments

Comments

@jansule
Copy link
Contributor

jansule commented Aug 2, 2021

Feature Request

Is your feature request related to a problem? Please describe.

Only one image can be applied for features in a layer. To have different icons, we need to either create multiple rules or have multiple layers for each image.

Describe the solution you'd like

Icon url should be decided based on feature attribute values and {{ templates }} in a similar way how the label for TextSymbolizer is created.

Describe alternatives you've considered

Walkaround is to create multiple rules and filters with one IconSymbolizer per each rule-filter pair.

Additional context

This is a copy of geostyler/geostyler-openlayers-parser#363 by @raitisbe. See also geostyler/geostyler-openlayers-parser#364

@jnewmoyer
Copy link

Wouldn't this be up to the renderer to do?

@jansule
Copy link
Contributor Author

jansule commented Jan 14, 2022

Wouldn't this be up to the renderer to do?

I'm not sure, if I understand correctly, but we have to specify what the renderer should display (e.g. via SLD).

So als long as the styling format specifies the functionality for feature dependend styling, and a renderer properly implements the styling specification, everything should work fine.

E.g. SLD allows feature dependend styling via Expressions. So we can set different icons for different features within the same rule, by using the Expression directive within the IconSymbolizer. Any SLD renderer should then be able to display this.

@jnewmoyer
Copy link

I guess this is for conversions FROM geostyler styles TO sld documents. I'm not exactly sure how that's useful, our use case is the other direction - SLD -> OL - see geostyler/geostyler-openlayers-parser#364 (comment)

@jnewmoyer
Copy link

I think that as long as the placeholders are converted from the SLD notation ${value} to the geostyler notation {{value}} then that would solve this. The placeholders then get replaced with the real values at render time. Ref: geostyler/geostyler-openlayers-parser#364 (comment)

@KaiVolland
Copy link
Contributor

@jnewmoyer @jansule is this discussion solved or outdated? If so please close this issue.

@jnewmoyer
Copy link

I'm pretty sure we are still doing special handling for the placeholders that aren't converted. However it could be fixed in the most recent release. We are a few versions behind.

@jansule
Copy link
Contributor Author

jansule commented May 29, 2024

Right, this issue is not yet solved. We do not (yet) support templating strings as image source.

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

3 participants