Jump to content

Extension talk:Maps/Flow archive/2023

Add topic
From mediawiki.org

Post questions, bug reports and feature requests at https://github.com/JeroenDeDauw/Maps/issues.

The maintainer of the Maps extension does not check this page frequently!


The documentation for the Maps extension is located at https://www.semantic-mediawiki.org/wiki/Extension:Maps



Archive

[edit]


Only one pop-up open at a time

[edit]

Hi everyone.

Is there a way to modify the extension so that when one marker is clicked (and pop-up appears), all other pop-ups close?

Thanks Levimot (talk) 16:08, 29 July 2023 (UTC)Reply

New installation gets Error 500 {{#display_map}}

[edit]

I am using MediaWiki 1.39.3, PHP 8.1.18, MariaDB 10.3.38, and Maps 10.0.0. When I view Special:Version, I can see Maps 10.0.0. Everything else in MediaWiki is working, but today I just tried to view a map for the first time and every time I try to enter something like any of these, the page gives Error 500:

{{#display_map:center=Brandenburg Gate Berlin}}

{{#google_maps:center=Brandenburg Gate Berlin}}


In my LocalSettings.php, I have the following:

wfLoadExtension( 'Maps' );

$egMapsDefaultService = 'googlemaps3';

$egMapsGMaps3ApiKey = '<my_key>';

$egMapsDefaultGeoService = 'google';


Any help would be greatly appreciated. 63.161.160.181 (talk) 20:22, 1 August 2023 (UTC)Reply

I'm posting an update to my own question. "tail /var/log/httpd/access_log" shows:
AH01071: Got error 'Primary script unknown' 63.161.160.181 (talk) 21:08, 1 August 2023 (UTC)Reply
I have the same problem.
WM 1.39.3, PHP 8.0.30 (fpm-fcgi), MariaDB 10.5.23, maps 10.1.1
when interting {{#display_map:center=Brandenburg Gate Berlin}} at main page for example I get the Error 500 when submitting.
Have you figured out the problem yet? 178.25.216.164 (talk) 20:55, 31 January 2024 (UTC)Reply

Use svg as an "overlay" in extension.maps

[edit]

I have an svg file containing some geo-referenced data from a GIS (QGIS). I like to use this as a layer or some kind of overlay to common maps in mediawiki. Extension:Maps is installed an works fine with #displaymap or |format=openlayers in semantic queries. Any hints are welcome. Carchaias (talk) 13:45, 24 August 2023 (UTC)Reply

Map and SMW error on template

[edit]

This template drives me crazy. Having this infobox, where I display in the last table row the map. It works for reading as planned, but if I start the Visual Editor I get a server error. Any idea?

<noinclude>
{{#template_params:Land (property=Land)|Bundesland (property=Foaf:Bundesland)|Maps (label=Maps Location;property=Foaf:GeoLocaction)|Flughöhe (label=Max. Flughöhe in Meter;property=Foaf:Max Flughöhe)}}
</noinclude><includeonly>{| style="width: 30em; font-size: 90%; border: 1px solid #aaaaaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; text-align:left;"
! style="text-align: center; background-color:#ccccff;" colspan="2" |<span style="font-size: larger;">{{PAGENAME}}</span>
|-
! Land
| [[Land::{{{Land|}}}]]
|-
! Bundesland
| [[Foaf:Bundesland::{{{Bundesland|}}}]]
|-
! Maps Location
| [[Foaf:GeoLocaction::{{{Maps|}}}]]
|-
! Max. Flughöhe in Meter
| [[Foaf:Max Flughöhe::{{{Flughöhe|}}}]]
|-
! colspan="2" | {{#ask: [[Foaf:GeoLocaction::{{{Maps}}}]] | format=leaflet | ?Foaf:GeoLocaction | template=Google Maps Link}}
|
! 
|{{#ask:[[Foaf:name::{{SUBJECTPAGENAME}}]]|format=list}}
|}

[[Kategorie:Spots]]
</includeonly>

Ordovicium (talk) 01:06, 2 September 2023 (UTC)Reply

Just a general commment first. You're using what's called "in-text annotation", using square bracket/colon notation to set values, but it seems that will stop being supported at some point in the future. I don't think that's the issue at hand, but it is recommended to switch to #set notation regardless.
As for the error messsage I don't know. Does it work in VE if you don't include the Leaflet map? Cavila 07:42, 2 September 2023 (UTC)Reply
Thanks for the note. I used PageForms to build the template. I need to change manual, but I see your point.
Beside this, googlemaps instead of Leaflet doesn't change the error message. Ordovicium (talk) 22:26, 2 September 2023 (UTC)Reply
What I meant is that you need to establish first whether or not your use of the Maps extension is what's causing the issue in VE, which you can do by removing the query entirely and see what happens. But maybe you tried that already. Cavila 07:45, 3 September 2023 (UTC)Reply

Call to undefined method ParamProcessor\Processor::setParameterDefinitions()

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


Hello, we have MW 1.39.4 LTS version in our RHEL 7 server. We have installed number of extensions and most of them are working properly. But Maps doesn't. Tried to add this one to show map, {{#display_map:center=Berlin|width=400|height=250}}

It throws below error:

/wiki/index.php?title=Testmap&action=submit Error: Call to undefined method ParamProcessor\Processor::setParameterDefinitions()

Backtrace:

from /data/www/html/wiki/extensions/Maps/src/Map/DisplayMap/DisplayMapFunction.php(58)

#0 /data/www/html/wiki/extensions/Maps/src/ParserHookSetup.php(80): Maps\Map\DisplayMap\DisplayMapFunction->getMapHtmlForKeyValueStrings()

#1 /data/www/html/wiki/extensions/Maps/src/ParserHookSetup.php(58): Maps\ParserHookSetup->handleFunctionHook()

#2 /data/www/html/wiki/includes/parser/Parser.php(3437): Maps\ParserHookSetup->Maps\{closure}()

#3 /data/www/html/wiki/includes/parser/Parser.php(3122): Parser->callParserFunction()

#4 /data/www/html/wiki/includes/parser/PPFrame_Hash.php(275): Parser->braceSubstitution()

#5 /data/www/html/wiki/includes/parser/Parser.php(2951): PPFrame_Hash->expand()

#6 /data/www/html/wiki/includes/parser/Parser.php(1609): Parser->replaceVariables()

#7 /data/www/html/wiki/includes/parser/Parser.php(723): Parser->internalParse()

#8 /data/www/html/wiki/includes/content/WikitextContentHandler.php(301): Parser->parse()

#9 /data/www/html/wiki/includes/content/ContentHandler.php(1721): WikitextContentHandler->fillParserOutput()

#10 /data/www/html/wiki/includes/content/Renderer/ContentRenderer.php(47): ContentHandler->getParserOutput()

#11 /data/www/html/wiki/includes/EditPage.php(4534): MediaWiki\Content\Renderer\ContentRenderer->getParserOutput()

#12 /data/www/html/wiki/includes/EditPage.php(4437): EditPage->doPreviewParse()

#13 /data/www/html/wiki/includes/EditPage.php(3143): EditPage->getPreviewText()

#14 /data/www/html/wiki/includes/EditPage.php(778): EditPage->showEditForm()

#15 /data/www/html/wiki/includes/actions/EditAction.php(73): EditPage->edit()

#16 /data/www/html/wiki/includes/actions/SubmitAction.php(38): EditAction->show()

#17 /data/www/html/wiki/includes/MediaWiki.php(542): SubmitAction->show()

#18 /data/www/html/wiki/includes/MediaWiki.php(322): MediaWiki->performAction()

#19 /data/www/html/wiki/includes/MediaWiki.php(904): MediaWiki->performRequest()

#20 /data/www/html/wiki/includes/MediaWiki.php(562): MediaWiki->main()

#21 /data/www/html/wiki/index.php(50): MediaWiki->run()

#22 /data/www/html/wiki/index.php(46): wfIndexMain()

#23 {main}


Product Version

MediaWiki 1.39.4

PHP 8.0.25 (apache2handler)

MySQL 8.0.26

Semantic MediaWiki 4.1.1 GPL-2.0-or-later

Maps 10.0.0 GPL-2.0-or-later


I am not sure why its throwing this error since all the required extensions and libs are installed (as per my knowledge). anybody knows why this behavior ? Testergt1302 (talk) 06:32, 25 September 2023 (UTC)Reply

Hi,
This got solved by myself, by cloning ParamProcessor from github and added those in Localsettings.php.
Thanks... Testergt1302 (talk) 13:43, 25 September 2023 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Image Overlay not aligned with geoJSON

[edit]

Hello! I am trying to get an image overlay to align with my geoJSON in leaflet, as in the New York subway example in the documentation. However, the image is always centred on (0,0), rather than where my geoJSON data is.


{{#display_map:|image layers=myimage.png|geojson=mygeojson|height=600|width=900|zoom=3.75}} 104.247.242.51 (talk) 15:22, 8 November 2023 (UTC)Reply

Edit: The image actually isn't centred on (0,0). I'm not sure how it is aligned, but it's not with the bounds of the geojson 104.247.242.51 (talk) 04:24, 9 November 2023 (UTC)Reply
Ah! It's always aligning the bottom-left corner of the image to (0,0). 104.247.242.51 (talk) 22:38, 9 November 2023 (UTC)Reply
I've tried to work around this by putting the bottom left corner of my geoJSON at (0,0), however the problem remains that the image layer is constrained to a set width, which cannot be modified inside the display_map code. 104.222.119.168 (talk) 19:42, 23 November 2023 (UTC)Reply
What you are trying to do is indeed not possible without changes to Maps. Pull Requests and/or funding welcome. Jeroen De Dauw (talk) 14:15, 16 December 2023 (UTC)Reply