function (childMarkers, positions) {
    var group = this._group,
      map = group._map,
      fg = group._featureGroup,
      i, m, leg, newPos;

    for (i = childMarkers.length - 1; i >= 0; i--) {
      newPos = map.layerPointToLatLng(positions[i]);
      m = childMarkers[i];

      m._preSpiderfyLatlng = m._latlng;
      m.setLatLng(newPos);
      if (m.setZIndexOffset) {
        m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING
      }

      fg.addLayer(m);


      leg = new L.Polyline([this._latlng, newPos], { weight: 1.5, color: '#222' });
      map.addLayer(leg);
      m._spiderLeg = leg;
    }
    this.setOpacity(0.3);
    group.fire('spiderfied');
  }
function (childMarkers, positions) {
    var group = this._group,
      map = group._map,
      fg = group._featureGroup,
      i, m, leg, newPos;

    for (i = childMarkers.length - 1; i >= 0; i--) {
      newPos = map.layerPointToLatLng(positions[i]);
      m = childMarkers[i];

      m._preSpiderfyLatlng = m._latlng;
      m.setLatLng(newPos);
      if (m.setZIndexOffset) {
        m.setZIndexOffset(1000000); 
      }

      fg.addLayer(m);


      leg = new L.Polyline([this._latlng, newPos], { weight: 1.5, color: '#222' });
      map.addLayer(leg);
      m._spiderLeg = leg;
    }
    this.setOpacity(0.3);
    group.fire('spiderfied');
  }
function ( childMarkers , positions ) { var group = this . _group , map = group . _map , fg = group . _featureGroup , i , m , leg , newPos ; for ( i = childMarkers . length - 1 ; i >= 0 ; i -- ) { newPos = map . layerPointToLatLng ( positions [ i ] ) ; m = childMarkers [ i ] ; m . _preSpiderfyLatlng = m . _latlng ; m . setLatLng ( newPos ) ; if ( m . setZIndexOffset ) { m . setZIndexOffset ( 1000000 ) ; //Make these appear on top of EVERYTHING } fg . addLayer ( m ) ; leg = new L . Polyline ( [ this . _latlng , newPos ] , { weight : 1.5 , color : '#222' } ) ; map . addLayer ( leg ) ; m . _spiderLeg = leg ; } this . setOpacity ( 0.3 ) ; group . fire ( 'spiderfied' ) ; }
Non Animated versions of everything
Non Animated versions of everything