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

How can I find the color of a raster layer at a given location? #11641

Closed
jbeuckm opened this issue Mar 25, 2022 · 1 comment
Closed

How can I find the color of a raster layer at a given location? #11641

jbeuckm opened this issue Mar 25, 2022 · 1 comment

Comments

@jbeuckm
Copy link

jbeuckm commented Mar 25, 2022

mapbox-gl-js version: latest

Question

We add a raster layer from a set of png files like http://server/{z}/{y}/{x}.png. I need to find the raster color at a particular lat/lon/z.

Links to related documentation

This seems like a function that could be exposed relative to a Source: https://docs.mapbox.com/mapbox-gl-js/api/sources/

Effectively, the rendering function has to find the color at each pixel that will be displayed. I want to expose that functionality so that, given any displayed position on the map, I could ask for what color the raster source ended up with for that pixel.

@asheemmamoowala
Copy link
Contributor

Thank you for opening this issue. It looks like it is a duplicate of #1404. If you feel the issue reported here is different, please share more details and we can reopen it.

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

2 participants