Extension talk:Maps/Flow archive/2022
Add topic| This page used the Structured Discussions extension to give structured discussions. It has since been converted to wikitext, so the content and history here are only an approximation of what was actually displayed at the time these comments were made. |
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]
Error: Maps\MapsSetup::__construct(): Argument #1 ($mwGlobals) cannot be passed by reference
[edit]| Product | Version |
|---|---|
| MediaWiki | 1.37.1 |
| PHP | 8.0.14 (fpm-fcgi) |
| MariaDB | 10.3.32-MariaDB-0ubuntu0.20.04.1 |
Just upgraded to 1.37.1 but I get error below when I try to run /maintenance/update.php. Disabling the extension Maps solves this issue.
[no req] Error: Maps\MapsSetup::__construct(): Argument #1 ($mwGlobals) cannot be passed by reference
Backtrace:
from /var/lib/mediawiki/extensions/Maps/MapsRegistration.php(48)
#0 /var/lib/mediawiki/includes/Setup.php(856): MapsRegistration::{closure}()
#1 /var/lib/mediawiki/maintenance/doMaintenance.php(90): require_once(string)
#2 /var/lib/mediawiki/maintenance/update.php(264): require_once(string)
#3 {main} Gachangi (talk) 08:17, 26 January 2022 (UTC)
- What version of Maps? Jeroen De Dauw (talk) 17:33, 27 January 2022 (UTC)
- Maps Version 9.0.1 @Jeroen De Dauw Gachangi (talk) 08:49, 31 January 2022 (UTC)
- Hmmm. The tests pass with MW 37 and PHP 8.0. https://maps.extension.wiki/ also runs these versions now and is working fine. (Well, it is broken in several other ways, but not the one reported here.)
- Could you post the issue at https://github.com/ProfessionalWiki/Maps/issues? Jeroen De Dauw (talk) 14:38, 7 February 2022 (UTC)
Creating my own layers
[edit]Hi Jeroen,
thank you for this great extension. By using it the question pops up if it would be possible to create my own layers out of a shape or geojson file. Just to overlay a given map but with the possibility to chose which overlay I want to see implemented in same menu where you can chose the layer (topo cycle etc).
Thank you!
Lars Larslaki (talk) 10:43, 22 February 2022 (UTC)
- Reported as a feature request: https://github.com/ProfessionalWiki/Maps/issues/682 [[kgh]] (talk) 16:56, 22 February 2022 (UTC)
Missing (geocode) permission
[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.
Hey, I've just discovered that the (geocode) permission has been removed in later versions of MediaWiki. I'm not saying that I have a problem with this. Since I've never properly understood what users with the permission were able to do that users without the permission weren't able to do. But I really want to know when exactly the said permission was removed. Since I want this information for my personal research. ― C.Syde (talk | contribs) 06:04, 22 April 2022 (UTC)
- https://github.com/ProfessionalWiki/Maps/commit/112f2065a17f3eee61fb9f7ed5f009dabf02dc42 Dylsss (talk) 00:38, 23 April 2022 (UTC)
- Thanks! :D ― C.Syde (talk | contribs) 05:20, 23 April 2022 (UTC)
Google Maps don't display / "not a LatLngBounds ..."
[edit]It seems the Google maps don't display anymore, even on the example page. The console reports a JS error:
not a LatLngBounds or LatLngBoundsLiteral: not an Object
Can someone else confirm? Jorges (talk) 00:42, 11 June 2022 (UTC)
- Coincidentally an issue was created for this on GitHub: issue 697. Let's see how that goes. [[kgh]] (talk) 14:23, 11 June 2022 (UTC)
Leaflet map doesn't display on small screen
[edit]I know this is a conflict somewhere between the Leaflet maps, the Map extension, MediaWiki, and the MonoBook skin involving CSS, but I don't know how to figure it where exactly the problem lies.
I have a new MediaWiki install (version 1.38.1, default skin = monobook) with the Maps extension (version 9.0.7), and maps I've added to pages work as described on the documentation pages.
The MonoBook skin with responsive mode checked mostly behaves as expected. But when a page gets narrow (as on mobile), about 550px or less, images and maps go from their normal left-aligned behavior to full width. Images become centered (OK), and maps become full width (OK), but the OSM map tiles disappear.
Part of what makes this more confusing to me is that the polygon for the map doesn't disappear, just the map tiles.
You can see this behavior here:
wiki.ouroakland.net/oaklandwiki/index.php/Peralta_Heights
Either resize your browser window narrower until the tiles disappear, or bring up the developer tools in Chrome, et al, toggle the device toolbar, then resize the simulator window until the tiles disappear. OurOakland (talk) 01:51, 6 July 2022 (UTC)
- Sorry for non-working link, kept getting ⧼abusefilter-warning-linkspam⧽ OurOakland (talk) 01:51, 6 July 2022 (UTC)
- Did you wrap the map into a div that does the resizing for you? [[kgh]] (talk) 07:16, 6 July 2022 (UTC)
- I've tried both with an enclosing div and without. The results are the same -- below a certain width, the map tiles disappear. Currently the map is without a div. OurOakland (talk) 14:28, 6 July 2022 (UTC)
- Ah, now I get what the issue is. I guess it is indeed worth filing an issue [[kgh]] (talk) 15:52, 6 July 2022 (UTC)
- Is that a "you are going to file an issue" on GitHub, or should I? OurOakland (talk) 19:14, 6 July 2022 (UTC)
- It will be great if you could do it. Thus you could also provide more info if need be. Thanks a lot. [[kgh]] (talk) 06:31, 7 July 2022 (UTC)
- Done. New issue. OurOakland (talk) 16:03, 7 July 2022 (UTC)
combined maps from a category?
[edit]I see in the examples how with Semantic MediaWiki a query can ask for pages in a particular category that have a given property like Has coordinates, and create a map of all those pages.
Is it possible to make a combined map of pages in a particular category that have different kinds of maps? That is, some that are single coordinates, and some that are polygons? The use case is a wiki with pages for different things in a neighborhood. Some are single coordinates (for example, the address of a historical building), some are larger areas (for example, a park or geographical feature), and some are lines (for example a street). On the page for the neighborhood, in addition to a list of the pages in that neighborhood, it would be nice to have a combined map, too.
thanks,
Gene OurOakland (talk) 22:54, 10 July 2022 (UTC)
conflict with Visual Editor
[edit]If I have a Maps template, e.g., #coordinates: on page, when I try to use the Visual Editor for that page, I get "Error contacting the Parsoid/RESTBase server (HTTP 500)" when I try to save the page. A page with nothing but {{#coordinates:37.8012055000000089,-122.2531170280909976}} shows the problem.
The error.log ends up with a bunch of things in it along the lines of:
[Mon Jul 11 18:05:01.677269 2022] [:error] [pid 329230:tid 3645043091200] [client xx.xx.xx.xx:52242] [client xx.xx.xx.xx] ModSecurity: Warning. Pattern match "(?:;|\\\\{|\\\\||\\\\|\\\\||&|&&|\\\\n|\\\\r|\\\\$\\\\(|\\\\$\\\\(\\\\(|`|\\\\${|<\\\\(|>\\\\(|\\\\(\\\\s*\\\\))\\\\s*(?:{|\\\\s*\\\\(\\\\s*|\\\\w+=(?:[^\\\\s]*|\\\\$.*|\\\\$.*|<.*|>.*|\\\\'.*\\\\'|\\".*\\")\\\\s+|!\\\\s*|\\\\$)*\\\\s*(?:'|\\")*(?:[\\\\?\\\\*\\\\[\\\\]\\\\(\\\\)\\\\-\\\\|+\\\\w'\\"\\\\./\\\\\\\\]+/)?[\\\\\\\\'\\"]*(?:l[\\\\\\\\'\\"]* ..." at ARGS:html. [file "/dh/apache2/template/etc/mod_sec3_CRS/REQUEST-932-APPLICATION-ATTACK-RCE.conf"] [line "122"] [id "932100"] [msg "Remote Command Execution: Unix Command Injection"] [data "Matched Data: ;function found within ARGS:html: <!doctype html><html prefix=\\x22dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/\\x22 about=\\x22https://wiki.ouroakland.net/Special:Redirect/revision/427\\x22><head prefix=\\x22mwr: https://wiki.ouroakland.net/Special:Redirect/\\x22><meta charset=\\x22utf-8\\x22><meta property=\\x22mw:pageId\\x22 content=\\x22121\\x22><meta property=\\x22mw:pageNamespace\\x22 content=\\x220\\x22><link rel=\\x22dc:replaces\\x22 resource=\\x22mwr:revision/0\\x22><meta property=\\x22m..."] [severity "CRITICAL"] [ver "OWASP_ [hostname "wiki.ouroakland.net"] [uri "/oaklandwiki/rest.php/wiki.ouroakland.net/v3/transform/html/to/wikitext/TestMaps/427"] [unique_id "YszIvUki-DtamwvGJ51NqgAAAAo"]
I can provide more log info if that is helpful.
thanks,
Gene OurOakland (talk) 01:12, 12 July 2022 (UTC)
- Versions are:
- |VisualEditor
- |0.1.2
- |}
- |Maps
- |9.0.7
- |} OurOakland (talk) 01:15, 12 July 2022 (UTC)
visual map editor created polygon with wrong coordinates
[edit]I enabled the visual Leaflet map editor per the instructions for a test page. The test page contained:
{{#display_map: center=Oakland,CA | geojson=GeoJson:TestMap}}Things almost worked correctly, except the resulting longitude values were all 360 too small. For example, the first coordinate was -482.262111 instead of -122.26111.
{"type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "title": "lake merritt", "description": "" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -482.262111, 37.810626 ], [ -482.260566, 37.806523 ], [ -482.258163, 37.804387 ], [ -482.256274, 37.805641 ], [ -482.255416, 37.807099 ], [ -482.249494, 37.808354 ], [ -482.251168, 37.804523 ], [ -482.253356, 37.804251 ], [ -482.254601, 37.801776 ], [ -482.254601, 37.800826 ], [ -482.257133, 37.799911 ], [ -482.259192, 37.798588 ], [ -482.261338, 37.799504 ], [ -482.26151, 37.801912 ], [ -482.260566, 37.804285 ], [ -482.261596, 37.805167 ], [ -482.263312, 37.807167 ], [ -482.262111, 37.810626 ] ] ] } } ]OurOakland (talk) 19:18, 14 July 2022 (UTC)
}- It has to do with "which" Oakland, CA I zoom in on initially. When the GeoJson page is first created and the visual map editor comes up, it shows a map of the whole world, repeating horizontally. If I zoom in to the the copy towards the left, the coordinates are off by -360. If I zoom in to the one towards the right, the coordinates are off by +360. If I scroll further left or right on the world map, the latitudes are off by larger amounts. OurOakland (talk) 19:52, 14 July 2022 (UTC)
How can I (or if it's even possible) use this to construct maps?
[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.
I'm looking to possibly use this to plot out planetary systems that have their data coordinates being on a 2d plane.
In no basic terms a map of this: sarna.net/wiki/File:3151_Known_Universe_(Sarna).svg
and have the points containing the other semantic information. DeadfirePrime (talk) 19:09, 3 August 2022 (UTC)
- https://github.com/ProfessionalWiki/Maps/issues/706 Jeroen De Dauw (talk) 17:53, 6 August 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.Displaying Icons
[edit]Hello,
we use a lot of maps on www.hammwiki.info. We're now migrating from multimaps to maps, since multimaps doesn't seem to be maintained any longer.
We using own icons to be shown in #display_map: and that principally works, but:
The only possibility I found out is to use a fully qualified url to the icon file, e.g. |icon=https://<domain.tld>/<iconfolder>/<iconfile>.png
Is there somewhat to use path to the icon? What's the base folder of this? Like |icon=<mediawiki installation folder/somewhat folder/somewhat icon file?
And: is it possible to show more than one custom icon on a map with multiple positions? if yes, how?
Thanks and RegardsFrank BonniHamm (talk) 13:30, 18 October 2022 (UTC)
- [Edited]
- Are you sure a full path is required? If
NewYorkSubwaySmall.jpgor perhapsFile:NewYorkSubwaySmall.jpgdoesn't work, you could try something like{{filepath:NewYorkSubwaySmall.jpg|15px}}. See Help:Magic words for guidance on how to use filepath. Cavila 14:11, 18 October 2022 (UTC) - I found out I just can upload the iconfile as an image and use the image name. Sorry, did not think of that before.
- Remains: Multiple custom icons? BonniHamm (talk) 14:22, 18 October 2022 (UTC)
- The documentation has a section on custom markers and gives the following example:
- Cavila 15:40, 18 October 2022 (UTC)
{{#display_map: Berlin~The city Berlin~Berlin is a really nice city and there is plenty of Club Mate~Red-marker.png; }} - On first try it does not work, it show display_maps' default marker and not the own one.
- {{#display_map: Pauluskirche Hamm~Pauluskirche~MarkerHML.png;}}
- Thank anyway, I'll do some more tests. BonniHamm (talk) 13:59, 19 October 2022 (UTC)
- The marker must be in the fourth position, not third. Try this (without description):
- Cavila 16:43, 19 October 2022 (UTC)
{{#display_map: Pauluskirche Hamm~Pauluskirche~~MarkerHML.png; }} - Jepp, that works, thanks
- unfortunatelynot without title like
- {{#display_map:
- Pauluskirche Hamm~~~MarkerHML.png;
- }} BonniHamm (talk) 08:31, 20 October 2022 (UTC)
Parameters title and label
[edit]Hi, the parameters title and label do not seem to work.
{{#display_map: 51.68137,7.81964~mytitle~mylabel}}
works
{{#display_map: 51.68137,7.81964 |title=mytitle |label=mylabel}}
does not.
What am I doimg wrong? Or is it an error in maps?
Also I do not get
{{#display_map: 51.68137,7.81964 |centre=51.6,7.8}}
i.e. map center at a different position than the icon running. All for leaflet. BonniHamm (talk) 10:52, 20 October 2022 (UTC)
"pagelabel=yes" not working
[edit]I think it is a bug. When using a semantic query like
{{#ask: [[Category:some_category]]
format=googlemaps pagelabel=yes }}
the titles don't appear inline on the map. Seva2345 (talk) 17:31, 9 November 2022 (UTC)