/**
  * Renders the marker image
  *
  * @param Ivory\GoogleMapBundle\Model\Overlays\MarkerImage $markerImage
  * @return string HTML output
  */
 public function render(MarkerImage $markerImage)
 {
     $html = array();
     $html[] = sprintf('var %s = new google.maps.MarkerImage("%s");' . PHP_EOL, $markerImage->getJavascriptVariable(), $markerImage->getUrl());
     if ($markerImage->hasSize()) {
         $html[] = sprintf('%s.size = %s;' . PHP_EOL, $markerImage->getJavascriptVariable(), $this->sizeHelper->render($markerImage->getSize()));
     }
     if ($markerImage->hasOrigin()) {
         $html[] = sprintf('%s.origin = %s;' . PHP_EOL, $markerImage->getJavascriptVariable(), $this->pointHelper->render($markerImage->getOrigin()));
     }
     if ($markerImage->hasAnchor()) {
         $html[] = sprintf('%s.anchor = %s;' . PHP_EOL, $markerImage->getJavascriptVariable(), $this->pointHelper->render($markerImage->getAnchor()));
     }
     if ($markerImage->hasScaledSize()) {
         $html[] = sprintf('%s.scaledSize = %s;' . PHP_EOL, $markerImage->getJavascriptVariable(), $this->sizeHelper->render($markerImage->getScaledSize()));
     }
     return implode('', $html);
 }
 /**
  * Checks the render method
  */
 public function testRender()
 {
     $pointTest = new Point(1.1, 2.1);
     $this->assertEquals(self::$pointHelper->render($pointTest), 'new google.maps.Point(1.1, 2.1)');
 }