예제 #1
0
 public function testPolygonWithoutAutoZoom()
 {
     $polygon = $this->getMock('Ivory\\GoogleMap\\Overlays\\Polygon');
     $this->setUpBound();
     $this->map->getBound()->expects($this->never())->method('extend');
     $this->map->addPolygon($polygon);
     $this->assertSame(array($polygon), $this->map->getPolygons());
 }
예제 #2
0
 /**
  * Renders the javascript container polygons.
  *
  * @param \Ivory\GoogleMap\Map $map The map.
  *
  * @return string The JS output.
  */
 public function renderJsContainerPolygons(Map $map)
 {
     $output = array();
     foreach ($map->getPolygons() as $polygon) {
         $output[] = sprintf('%s.polygons.%s = %s', $this->getJsContainerName($map), $polygon->getJavascriptVariable(), $this->polygonHelper->render($polygon, $map));
     }
     return implode('', $output);
 }