Example #1
0
 /**
  * @see SpecialPage::execute
  *
  * @since 2.0
  *
  * @param null|string $subPage
  */
 public function execute($subPage)
 {
     $this->setHeaders();
     $outputPage = $this->getOutput();
     $outputPage->addHtml(MapsGoogleMaps3::getApiScript($this->getLanguage()->getCode(), array('libraries' => 'drawing')));
     $outputPage->addModules('mapeditor');
     $editorHtml = new MapEditorHtml($this->getAttribs());
     $html = $editorHtml->getEditorHtml();
     $outputPage->addHTML($html);
 }
Example #2
0
 /**
  * @since 2.0
  *
  * @param string $coordinates
  * @param string $input_name
  * @param boolean $isMandatory
  * @param boolean $isDisabled
  * @param array $params
  *
  * @return string
  */
 public function getEditorInputOutput($coordinates, $input_name, $isMandatory, $isDisabled, array $params)
 {
     global $wgOut;
     $wgOut->addHTML(MapsGoogleMaps3::getApiScript('en', array('libraries' => 'drawing')));
     $wgOut->addModules('mapeditor');
     $html = Html::element('div', array('id' => 'map-polygon', 'name' => $input_name, 'cols' => 4, 'rows' => 2), $coordinates);
     $editorHtml = new MapEditorHtml($this->getAttribs());
     $html = $html . $editorHtml->getEditorHtml();
     return $html;
 }