public function testMarker()
 {
     $marker = $this->getMock('Ivory\\GoogleMap\\Overlays\\Marker');
     $this->markerCluster->setMarkers(array($marker));
     $this->assertTrue($this->markerCluster->hasMarkers());
     $this->assertSame(array($marker), $this->markerCluster->getMarkers());
 }
 /**
  * {@inheritdoc}
  */
 public function renderMarkers(MarkerCluster $markerCluster, Map $map)
 {
     $output = array();
     foreach ($markerCluster->getMarkers() as $marker) {
         $output[] = $this->renderMarker($marker, $map);
         if ($marker->hasInfoWindow() && $marker->getInfoWindow()->isAutoOpen()) {
             $this->registerInfoWindowEvent($marker, $map);
         }
     }
     return implode('', $output);
 }
Esempio n. 3
0
 /**
  * Gets the map markers.
  *
  * @return array The map markers.
  */
 public function getMarkers()
 {
     return $this->markerCluster->getMarkers();
 }