public function testInit()
 {
     $widget = OpenLayers::begin();
     $this->assertTrue(isset($widget->options['id']));
     $this->assertTrue(isset($widget->mapOptions['target']));
     $this->assertArrayHasKey(OpenLayersBundle::className(), $widget->view->assetBundles);
     $this->assertArrayHasKey(OLModuleBundle::className(), $widget->view->assetBundles);
 }
Esempio n. 2
0
 public function init()
 {
     if (!isset($this->options['id'])) {
         $this->options['id'] = $this->getId();
     }
     $this->mapOptions['target'] = $this->options['id'];
     OpenLayersBundle::register($this->view);
     OLModuleBundle::register($this->view);
 }