mapbox获取点栅格层颜色
除了地图外,我想显示一个传奇滑块,以显示悬停区域的自定义栅格层的颜色。因此,我需要在光标所在的位置获取图层像素颜色。
我找到了一个解决方案,可以在地图上获得像素的颜色如何在Mapbox上获取像素的颜色,但是,如果我们悬停了道路或名称,则会阅读另一种颜色。
有没有办法在特定地图点上读取图层颜色?
I want to display a legend slider besides the map to show the color of the custom raster layer, of the hovered territory. Therefore, I need to get the layer pixel color where the cursor is.
I have found a solution to get the color of a pixel on the map How to get the color of pixels on mapbox, however, if we hover roads or names, another color gets read.
Is there a way to read the layer color on a specific map point?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是道路和放置标签被烘烤到栅格中,还是覆盖为矢量数据采购的层?
除了查询画布外,我不确定另一种方法,在这种情况下,一个选项是隐藏矢量层,查询,然后重新发出。但这可能不会导致您想要的互动?
Are the roads and place labels baked into the raster, or overlaid as vector data sourced layers?
I'm not sure of another method besides querying the canvas, in which case one option would be to hide the vector layers, query, then reshow. But that may not result in the interaction you want?