/**
  * Configures the json builder in order to render an info window.
  *
  * @param \Ivory\GoogleMap\Helper\Overlays\InfoWinfow $infoWindow     The info window.
  * @param boolean                                     $renderPosition TRUE if the position is rendered else FALSE.
  */
 protected function doRender(InfoWindow $infoWindow, $renderPosition)
 {
     $this->jsonBuilder->reset();
     if ($renderPosition) {
         $this->jsonBuilder->setValue('[position]', $infoWindow->getPosition()->getJavascriptVariable(), false);
     }
     if ($infoWindow->hasPixelOffset()) {
         $this->jsonBuilder->setValue('[pixelOffset]', $infoWindow->getPixelOffset()->getJavascriptVariable(), false);
     }
     $this->jsonBuilder->setValue('[content]', $infoWindow->getContent())->setValues($infoWindow->getOptions());
 }
Ejemplo n.º 2
0
 public function testContentWithValidValue()
 {
     $this->infoWindow->setContent('foo');
     $this->assertSame('foo', $this->infoWindow->getContent());
 }