首页 / 浏览问题 / WebGIS / 问题详情
超图FAQ:【iClient】iClient for Leaflet的MapV图层是否支持添加点击事件?
44,106EXP 2023年10月18日
【iClient】iClient for Leaflet的MapV图层是否支持添加点击事件?

1个回答

【解决办法】支持添加点击事件,通过给MapVLayer的options添加methods来实现。 示例代码: var options = { gradient: { 0: 'yellow', 1: 'red' }, globalAlpha: 1, draw: 'intensity', methods: { // 一些事件回调函数 click: function (item) { // 点击事件,返回对应点击元素的对象值 console.log(item) if (item != null) { let popup; popup = L.popup({ className: 'mapvPopup' });
44,106EXP 2023年10月18日
热门文章
关注我们
...