-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Gradient Fill for Polygons #5005
Comments
I think you can use a gradient pattern for these polygons, can't you? |
Dear HarelM, I cant find how to implement that, I thought that this was currently impossible? Do you have a link to the documentation for that? Thanks! |
Dear @HarelM I dont believe this can solve the issue. The gradient for 'line-gradient' goest from the beginning to the end of a line feature, not across its width. I dont think 'line-pattern' could be used at all? love to know if you had a hacky idea to make it work though! |
I mentioned line-pattern with a sprite icon that resembles a gradient. We use it in Israel Hiking Map to show nature reserve borders. |
line-pattern would create artifacts at sharp corners and narrow sections. These would become more visible the wider the gradient effect is. A universal approach would need to implement a shader with a signed distance field (could be costly performance wise). Alternatively a raster layer with precomputed Shapeburst Fill should work and is the quickest solution. |
You can also use image instead of raster: |
User Story
As someone who works in areas with territorial boundary disputes, I need to be able to represent polygons with uncertain edges, so that I can produce web maps that do not create further disputes.
Rationale
There are cases where we need to represent polygons with uncertain boundaries.
In QGIS, the Shapeburst Fill gives the best result for this:
https://www.reddit.com/r/QGIS/comments/qqsy1h/how_could_i_make_only_the_edges_of_the_polygons/
Gradient fills are another way to achieve this. Here is an example, produced in QGIS:
Gradient Fills are implemented in another web mapping library Maptalks https://maptalks.org/examples/en/style/polygon-gradient/
It would be great if this kind of symbology could be implemented in MapLibre.
We are open to funding the development of this.
Impact
Some user will choose to use another mapping platform, if this is absolutely critical to end users.
The text was updated successfully, but these errors were encountered: