anchor.diff:        markerList.push(marker);
         google.maps.event.addListener(marker, 'click', function(){
           $('.flexslider').flexslider(marker.getZIndex());
  +        moveActiveMarker(marker);
           markerList.forEach(function(marker){
             marker.setIcon(iconInactive);
           });
           marker.setIcon(iconActive);
  +        map.panTo(marker.getPosition());
  +        map.setZoom(4);
         });
       }, <%= @counter %> * 180);
         <% end %>
  
positive.code:     },
      after : function(slider){
        setActive(slider.currentSlide);
      },
    });
  });
  </script>
  
negative.code: 
    function setActive(current) {
      markerList.forEach(function(marker){
        if (marker.getZIndex() == current) {
          moveActiveMarker(marker);
          marker.setIcon(iconActive);
          map = marker.getMap();
          map.panTo(marker.getPosition());
        } else {
          marker.setIcon(iconInactive);
        }
      });
    }
  
    function moveActiveMarker(marker) {
      markerActive.setPosition(marker.getPosition());
      markerActive.setTitle(marker.getTitle());
      markerActive.setVisible(true);
    }
  
    google.maps.event.addDomListener(window, 'load', initialize);
  