Is it possible to use terrain data in a custom style layer to shade the map? #4133
Unanswered
larsmaxfield
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Terrain data can be fetched from the tiles, source cache, and stuff like that. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let me know if this is not the appropriate forum to ask this question.
Is possible to use terrain data in a custom style layer to color the map based on elevation?
My goal is to have a custom layer which achieves this:
I achieved that^ by editing the existing shaders in the hillshading layer because they already have methods to calculate the elevation and shade the terrain.
I'd like to now properly implement this elevation coloring using the API.
Custom layers appear to be the way to do this because I can render custom WebGL content in them. However, I have not found a way forward which allows me to access terrain data and therefore determine elevation — that is why I'm asking here if it is even possible to do so.
Beta Was this translation helpful? Give feedback.
All reactions