From: philipp Date: Thu, 24 Oct 2013 16:35:09 +0000 (+0000) Subject: Changed map output to DOM based output. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/mediawiki_extensions/wrmap.git/commitdiff_plain/6ddb8a8bf303a33e167ba31922b989043b57e744 Changed map output to DOM based output. git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrmap/trunk@1750 7aebc617-e5e2-0310-91dc-80fb5f6d2477 --- diff --git a/wrmap.body.php b/wrmap.body.php index 4b0dc5a..ccb5b80 100644 --- a/wrmap.body.php +++ b/wrmap.body.php @@ -233,11 +233,9 @@ class WrBaseMap { // Create
element where the map is placed in global $wgExtensionAssetsPath; - $output = "
"; - $output .= htmlspecialchars($json_string, ENT_NOQUOTES); - $output .= "
\n"; - - return array($output, 'markerType' => 'nowiki'); + $doc = new WrMapDOMDocument(); + $doc->appendElement('div', array('class' => 'wrmap', 'style' => 'border-style:none;', 'data-img-path' => "$wgExtensionAssetsPath/wrmap/openlayers/img/"))->appendText($json_string); + return array($doc->saveHTML($doc->firstChild), 'markerType' => 'nowiki'); } }