Ejemplo n.º 1
0
 public function testTypeWithValidValue()
 {
     $this->markerShape->setType('rect');
     $this->assertSame('rect', $this->markerShape->getType());
 }
 /**
  * Renders a marker shape.
  *
  * @param \Ivory\GoogleMap\Overlays\MarkerShape $markerShape The marker shape.
  *
  * @return string The JS output.
  */
 public function render(MarkerShape $markerShape)
 {
     return sprintf('%s = new google.maps.MarkerShape(%s);' . PHP_EOL, $markerShape->getJavascriptVariable(), json_encode(array('type' => $markerShape->getType(), 'coords' => $markerShape->getCoordinates())));
 }