获取无法阅读财产'风格'对于簇内的那些标记,为null(Leaflet.SmoothMarkerBouncing)

时间:2016-05-26 13:22:44

标签: leaflet leaflet.markercluster

获取无法阅读属性'风格'对于集群内的那些标记,为null

function markerFunction(id){

 for (var i in m){

        var markerID = m[i].options.title;
        if (markerID == id){

            m[i].openPopup();

            if(m[i].isBouncing())
            {
                m[i].stopBouncing();
                m[i].closePopup();
            }
            else{
                markers.zoomToShowLayer(m[i], function(){
                m[i].setBouncingOptions({
                bounceHeight : 20,    // height of the bouncing
                bounceSpeed  : 40,    // bouncing speed coefficient
                exclusive    : true,  // if this marker bouncing all others must stop
               }).bounce();
            });
            }

        }
   }
}

enter image description here

当我放大群集时,标记也会消失,当我缩小时,标记也会再次出现

我做错了什么,需要帮助

0 个答案:

没有答案