summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2021-10-19 20:24:11 -0300
committerYaco <franco@reevo.org>2021-10-19 20:24:11 -0300
commite3880a1c86acaa3bbd05786ad2f5c586e6511a58 (patch)
treeec77bfc5b69f259a159c95188797bd0dade92357 /www/wiki/extensions/Maps/src/SemanticMW/ResultPrinters/MapPrinter.php
parent20ca0685509f8010580d3b45036a64ab48616af1 (diff)
updates Maps to 7.13.0
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',