Extension talk:Maps/Flow archive/2021
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
GeoJson: possibility to link to Wiki page?
When using the GeoJson format, is it possible to have, e.g. in de 'description' property, a link to a Wiki page? It's not in the list with limitations (https://maps.extension.wiki/wiki/Leaflet_GeoJSON#Limitations). Jvos2020 (talk) 18:03, 29 January 2021 (UTC)
- Good question. Came here for the same feature. Shyamal (talk) 09:09, 24 November 2023 (UTC)
- So I added the feature by editing /Maps/resources/leaflet/FeatureBuilder.js
- and modifying function createMarker(properties, options) with something like
- if( properties.hasOwnProperty('text') && properties.text.length > 0 ) {
- marker.bindPopup( '<a href="/'+ properties.title+'>'+properties.text+'</a>' );
- } Shyamal (talk) 14:34, 24 November 2023 (UTC)
Entering coordinates of a polygon
A point location is stored as e.g. 51.752367847997384, 5.0420263451101572
I want to record a polygon. Via the Forms extension I didn't see how to add a polygon. On the Leaflet map it looks like I only can add a point. So I manually added a series of coordinates to the page. But they aren't recognized. This is what I entered on the page (within a template):
|Parcel=269
|Place=MyPlace
|Contour=51.752367847997384, 5.0420263451101572:
51.754842329817762, 5.0411433012562128:
51.754655975172547, 5.0408091395273438:
51.754514557197254, 5.0405474436405431:
51.752183917880750, 5.0413954272633106:
51.752340178664198, 5.0420365855845324:
51.752367847997384, 5.0420263451101572
And maybe to better illustrate my intention. See below the code to display some parcels.
{{#display_map:polygons=
51.752367847997384, 5.0420263451101572:
51.754842329817762, 5.0411433012562128:
51.754655975172547, 5.0408091395273438:
51.754514557197254, 5.0405474436405431:
51.752183917880750, 5.0413954272633106:
51.752340178664198, 5.0420365855845324:
51.752367847997384, 5.0420263451101572
~MyPlace - 269~Details about this parcel <link to page goes here>
51.75284463529357, 5.0431281849590839:
51.755482428207017, 5.0421830972897626:
51.754842329817762, 5.0411433012562128:
51.752367847997384, 5.0420263451101572:
51.752488841037191, 5.0425605930727997:
51.752520221076558, 5.0426892422115497:
51.752655384114384, 5.0426353602107286:
51.752733376720805, 5.0431660421107614:
51.75284463529357, 5.0431281849590839
~MyPlace - 268~Details about this parcel <link to page goes here>;
| width=800 | height=400 | resizable=yes
}}
However what I want is an #ask to retrieve the coordinates from alle the parcel pages.
What should I do to have a polygon on each page as a semantic property? Jvos2020 (talk) 16:15, 2 February 2021 (UTC)
Compound Queries with multiple attributes as result don't show on map
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,
I've got this query to show a map of subobjects:
{{#ask: [[Belongs to::{{PAGENAME}}]] |[[Coordinates::+]] |?Coordinates |?Name |?Adresse |?Online |?Typ | template=Popup Maps | showtitle=off | format=leaflet | icon=Map marker icon – Nicolas Mollet – Library – Stores – classic.png | cluster=yes | clustermaxradius=8 }}
which works fine. I want to make use of the same thing with compound subqueries.
{{#compound_query:
[[Belongs to::{{PAGENAME}}]]
[[Coordinates::+]]
; format=leaflet
; ?Coordinates
; ?Name
|
[[Belongs to::{{PAGENAME}}]]
[[Coordinates::+]]
[[Typ::Krankenhaus]]
; format=leaflet
; icon=Hospital_symbol_FLC.svg
; ?Coordinates
| template=Popup Maps
| showtitle=off
| cluster=yes
| clustermaxradius=8
}}
does not work as it does not return a map but a table of results. As soon as I add another attribute except for the coordinates like "Name" above which I'd like to show using the template things don't work. I couldn't find a clue yet. Maybe someone can help.
Thanks! C holtermann (talk) 10:30, 6 August 2021 (UTC)
- And just seconds after writing this I found a solution:
- {{#compound_query: [[Belongs to::{{PAGENAME}}]] [[Coordinates::+]] ; ?Coordinates ; ?Name | [[Belongs to::{{PAGENAME}}]] [[Coordinates::+]] [[Typ::Krankenhaus]] ; icon=Hospital_symbol_FLC.svg; ?Coordinates | template=Popup Maps | showtitle=off | cluster=yes | clustermaxradius=8 | format=leaflet }}
- format=leaflet needs to be at the end. It's a bit weird though that it only breaks when searching for a second attribute. C holtermann (talk) 10:32, 6 August 2021 (UTC)