zoukankan      html  css  js  c++  java
  • Openlayers ol.interaction.Select传值问题

    说明:

    在使用ol.interaction.Select时,我定义的变量作用域作用不到其回调函数里,但我在select结果中,需要用到这些变量

    解决方案:

    虽想了个办法解决了,但不知道是不是合理;是否有其他解决方法

            let selecthover = new ol.interaction.Select({
                condition: ol.events.condition.click,
                layers: [animationLineLayer]
            });
            selecthover.set("arrPoints", that._pointArray);
            selecthover.on("select", function (evt) {
                var tmpPointsArray = this.getProperties()["arrPoints"];
            });
  • 相关阅读:
    LeetCode
    LeetCode
    LeetCode
    LeetCode
    netty中Pipeline的ChannelHandler执行顺序案例详解
    Pi-设置无线
    Pi1-Centos
    gitlab升级
    ansible
    我也玩Jenkins
  • 原文地址:https://www.cnblogs.com/giser-s/p/11855391.html
Copyright © 2011-2022 走看看