简体   繁体   English

如何在mapbox gl js中的wms图层示例上添加鼠标移动事件?

[英]How to add mouse move event on a wms layer example in mapbox gl js?

I tried to add mouse move event on this wms layer in my code. 我尝试在代码中的此wms层上添加鼠标移动事件。 But doesn't works. 但是不起作用。 Used this example to test https://docs.mapbox.com/mapbox-gl-js/example/wms/ 使用此示例测试https://docs.mapbox.com/mapbox-gl-js/example/wms/

map.on('mousemove' , 'wms-test-layer' , function(e) {

});

I think that it doesn't work because mousemove relies on queryRenderedFeatures . 我认为这是行不通的,因为mousemove依赖于queryRenderedFeatures Probably you can fill an issue in the mapbox-gl-js repo. 可能您可以在mapbox-gl-js存储库中填写问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM