Пример #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');
     $editor = new MapEditor($this->getAttribs());
     $html = $editor->getEditorHtml();
     $outputPage->addHTML($html);
 }
Пример #2
0
    /**
     * @since 2.0 alspha
     * 
     * @param string $coordinates
     * @param string $input_name
     * @param boolean $is_mandatory
     * @param boolean $is_disabled
     * @param array $field_args
     * 
     * @return string
     */
    public function getEditorInputOutput($coordinates, $input_name, $is_mandatory, $is_disabled, array $params)
    {
        global $wgOut;
        $parameters = array();
        $wgOut->addHtml(MapsGoogleMaps3::getApiScript('en', array('libraries' => 'drawing')));
        $wgOut->addModules('mapeditor');
        $html = '
			<div >
				<textarea id="map-polygon" name="' . htmlspecialchars($input_name) . '" cols="4" rows="2"></textarea>
			</div>';
        $editor = new MapEditor($this->getAttribs());
        $html = $html . $editor->getEditorHtml();
        return $html;
    }