Пример #1
0
 public function testRadiusWithValidValue()
 {
     $this->circle->setRadius(3);
     $this->assertSame(3, $this->circle->getRadius());
 }
Пример #2
0
 /**
  * Renders a circle.
  *
  * @param \Ivory\GoogleMap\Overlays\Circle $circle The circle.
  * @param \Ivory\GoogleMap\Map             $map    The map.
  *
  * @return string The JS output.
  */
 public function render(Circle $circle, Map $map)
 {
     $this->jsonBuilder->reset()->setValue('[map]', $map->getJavascriptVariable(), false)->setValue('[center]', $circle->getCenter()->getJavascriptVariable(), false)->setValue('[radius]', $circle->getRadius())->setValues($circle->getOptions());
     return sprintf('%s = new google.maps.Circle(%s);' . PHP_EOL, $circle->getJavascriptVariable(), $this->jsonBuilder->build());
 }