summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php')
-rw-r--r--www/wiki/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php17
1 files changed, 4 insertions, 13 deletions
diff --git a/www/wiki/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php b/www/wiki/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php
index 6ab945f6..7a5f64b5 100644
--- a/www/wiki/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php
+++ b/www/wiki/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php
@@ -2,19 +2,15 @@
namespace Maps\SemanticMW\ResultPrinters;
-use FormatJson;
-use Html;
use Linker;
use Maps\Elements\BaseElement;
use Maps\Elements\Location;
use Maps\FileUrlFinder;
use Maps\MappingService;
-use Maps\MapsFunctions;
use Maps\Presentation\ElementJsonSerializer;
use Maps\Presentation\MapHtmlBuilder;
use Maps\Presentation\WikitextParser;
use Maps\Presentation\WikitextParsers\LocationParser;
-use ParamProcessor\ParamDefinition;
use Parser;
use SMW\Query\ResultPrinters\ResultPrinter;
use SMWOutputs;
@@ -113,6 +109,8 @@ class MapPrinter extends ResultPrinter {
return $this->fatalErrorMsg;
}
+ $this->isHTML = true;
+
$factory = \Maps\MapsFactory::newDefault();
$this->locationParser = $factory->newLocationParser();
$this->fileUrlFinder = $factory->getFileUrlFinder();
@@ -205,7 +203,7 @@ class MapPrinter extends ResultPrinter {
$params['centre'] = $this->getCenter( $params['centre'] );
$iconUrl = $this->fileUrlFinder->getUrlForFileName( $params['icon'] );
- $visitedIconUrl = $this->fileUrlFinder->getUrlForFileName( $params['visitedicon'] );
+ $visitedIconUrl = $this->fileUrlFinder->getUrlForFileName( $params['visitedicon'] ?? '' );
$params['locations'] = $this->getJsonForStaticLocations(
$params['staticlocations'],
@@ -318,10 +316,6 @@ class MapPrinter extends ResultPrinter {
$params = parent::getParameters();
$paramInfo = $this->getParameterInfo();
- // Do not display this as an option, as the format already determines it
- // TODO: this can probably be done cleaner with some changes in Maps
- unset( $paramInfo['mappingservice'] );
-
$params = array_merge( $params, $paramInfo );
return $params;
@@ -335,10 +329,7 @@ class MapPrinter extends ResultPrinter {
private function getParameterInfo() {
global $smgQPShowTitle, $smgQPTemplate, $smgQPHideNamespace;
- $params = array_merge(
- ParamDefinition::getCleanDefinitions( MapsFunctions::getCommonParameters() ),
- $this->service->getParameterInfo()
- );
+ $params = $this->service->getParameterInfo();
$params['staticlocations'] = [
'type' => 'mapslocation',