Skip to content

Commit

Permalink
Fix marker staggering. Version 0.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
galen committed Jul 25, 2011
1 parent 7dcf61f commit 6335387
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PHPGoogleMaps/Map.php
Expand Up @@ -1473,7 +1473,7 @@ public function enableMarkerStaggering( $timeout=100 ) {
$this->stagger_markers = $timeout;
$this->addObject(
new \PHPGoogleMaps\Event\EventListener(
$this->getJsVar(),
$this,
'idle',
sprintf( 'function(){j=0;for(var i=0;i<%1$s.length-1;i++){setTimeout(function(){%1$s[j] = new google.maps.Marker(%1$s[j++])},i*%2$s)};setTimeout(function(){%1$s[%1$s.length-1] = new google.maps.Marker(%1$s[%1$s.length-1])},((%1$s.length-1)*%2$s))}',
$this->getMarkersJsVar(),
Expand Down

0 comments on commit 6335387

Please sign in to comment.