Module talk:Mapframe
![]() | Module:Mapframe is permanently protected from editing because it is a heavily used or highly visible module. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit.
|
This is the talk page for discussing improvements to the Mapframe module, and the related Maplink template. |
|
Archives: 1, 2Auto-archiving period: 5 months ![]() |
Frequently asked questions (see also: mw:Help:Extension:Kartographer) Q1: Where to file a bug report when there is a problem with the base map? (e.g. a missing lake)
A1: If the problem also occurs on OpenStreetMap, it needs to be fixed there. If the problem is only on Wikimedia's maps, it can be reported on Phabricator (you can log in with you Wikipedia account). See mw:How to report a bug for instructions (for the tags, use Maps). (Alternatively, you can try mw:Help talk:Extension:Kartographer) Q2: Where to report other bugs or problems with the maps?
A2: This may be a problem with the Wikipedia module, or it may be an underlying software bug (there are lots of those).
Q3: Why does the thumbnail map render as a static image when viewing pages, but is interactive when editing pages?
A3: On Wikipedia, and most wikis other than Wikivoyage, the emdeded thumbnail is a static map, and the full screen map needs to be opened before the map can be zoomed or panned. This is for for performance reasons, and to present some content if javascript is disabled, and for printing. That preview mode shows an interactive map is a bug, phab:T203863 (and also a performance issue). Further explanation can be found in the comments on phab:T202793. Q4: Why is a line or shape feature from OpenStreetMap not being shown?
A4: There are several possible causes:
Q5: Why are line, shape, or point features are not shown after editing or adding a map, even though they were shown in the page preview?
A5: This is a bug related to generating thumbnail map images. It should fix itself in an hour or two. See phab:T269984 for details. Q6: A page using mapframe's
|raw= parameter is showing error messages of "The time allocated for running scripts has expired." What can be done?A6: If the amount of raw data to be processed is too large, that timeout message may be shown. You can try moving the raw data to Commons (example) or replacing the mapframe template with the equivalent wikitext using Special:ExpandTemplates (example) |
![]() | To help centralize discussions and keep related topics together, Template talk:Maplink and related subpages redirect here |
Copying template to another language wiki
Hi, I would like to request that this template, together with its dependencies be copied over to the Bulgarian wiki. There are a lot of pages that would benefit from it and there is currently no alternative template to use. The parameters can be left as is, but if needed I can translate them over.
broken map link
Is it just me or does infobox mapframe not work at Sokolac Fortress (Bihać)? I don't see why, it links to https://www.wikidata.org/wiki/Q25555219 which in turn links to https://www.openstreetmap.org/relation/14304925 so it all seems fine...? --Joy (talk) 09:57, 23 February 2024 (UTC)
- Have fixed. Regards, The Equalizer (talk) 03:51, 24 February 2024 (UTC)
- @The Equalizer you fixed it? Thanks, but what was the trick, for future reference? --Joy (talk) 19:52, 24 February 2024 (UTC)
- Because {{Infobox mapframe}} was used standalone in the {{Infobox military installation}} template of the page, and the Wikidata entry had both the P625 point and P402 shape attributes (which reserves a space on the Wiki Map servers to save a map), it defaults to only trying to show the shape unless extra parameters are specified such as
|point=on
or|coord=<coords...>
to show a marker. However, the map was centring on 0,0 coordinates in the Atlantic Ocean. - That's because there was no actual shape stored on the Wiki map servers that mirror OpenStMap, as the
type
parameter for the shape on OSM needs to be one of four (mw:Help:Extension:Kartographer/OSM#How to get a single object from multiple lines) that causes the shape to be migrated across and so be available. I figured it is nicer to have that available than a simple marker, and settype
as boundary. Regards, The Equalizer (talk) 21:37, 24 February 2024 (UTC)- Ohh, so the previous OSM type of "building" was the bad part... Would it make sense to add hints to this effect somewhere in Template:Infobox mapframe/doc or Template:Maplink/doc? We seem to document a lot of the other aspects of the Kartographer extension but not this. --Joy (talk) 16:03, 25 February 2024 (UTC)
- The OSM Media Wiki page I referenced above was in Template:Maplink/doc and in #4 of Module talk:mapframe/FAQ (which is at the top of Template talk:Infobox mapframe). Trouble is, they are all sprawling documents and it's hard to pick out the specifics at times. I've added the FAQ link to them all and updated it with the fourth type parameter. Regards, The Equalizer (talk) 22:59, 25 February 2024 (UTC)
- Oh yeah, I would not really expect anyone to look for template documentation at template talk. This FAQ should be transcluded into the standard template/module/whatever documentation element, putting it on Talk is tantamount to hiding it, which seems counterproductive :D Done that now. --Joy (talk) 09:19, 26 February 2024 (UTC)
- I note the relation for this shape has changed so it will need redefining on OSM @Joy - not signed in on OSM at the moment as not home. Regs The Equalizer (talk) 07:52, 31 May 2024 (UTC)
- Interesting, https://www.openstreetmap.org/relation/14304925 says version #5 was a deletion described as "Modified multipolygon #RelationsCleanup". So I guess we're supposed to clean up after the cleanup? :D I guess I'll make Wikidata use https://www.openstreetmap.org/relation/16821352 now --Joy (talk) 12:18, 31 May 2024 (UTC)
- It's OSM that needs the update... I've done this now. Give it a day... Regs, The Equalizer (talk) 18:46, 31 May 2024 (UTC)
- Now displaying. Regs, The Equalizer (talk) 01:31, 1 June 2024 (UTC)
- It's OSM that needs the update... I've done this now. Give it a day... Regs, The Equalizer (talk) 18:46, 31 May 2024 (UTC)
- Interesting, https://www.openstreetmap.org/relation/14304925 says version #5 was a deletion described as "Modified multipolygon #RelationsCleanup". So I guess we're supposed to clean up after the cleanup? :D I guess I'll make Wikidata use https://www.openstreetmap.org/relation/16821352 now --Joy (talk) 12:18, 31 May 2024 (UTC)
- I note the relation for this shape has changed so it will need redefining on OSM @Joy - not signed in on OSM at the moment as not home. Regs The Equalizer (talk) 07:52, 31 May 2024 (UTC)
- Oh yeah, I would not really expect anyone to look for template documentation at template talk. This FAQ should be transcluded into the standard template/module/whatever documentation element, putting it on Talk is tantamount to hiding it, which seems counterproductive :D Done that now. --Joy (talk) 09:19, 26 February 2024 (UTC)
- The OSM Media Wiki page I referenced above was in Template:Maplink/doc and in #4 of Module talk:mapframe/FAQ (which is at the top of Template talk:Infobox mapframe). Trouble is, they are all sprawling documents and it's hard to pick out the specifics at times. I've added the FAQ link to them all and updated it with the fourth type parameter. Regards, The Equalizer (talk) 22:59, 25 February 2024 (UTC)
- Ohh, so the previous OSM type of "building" was the bad part... Would it make sense to add hints to this effect somewhere in Template:Infobox mapframe/doc or Template:Maplink/doc? We seem to document a lot of the other aspects of the Kartographer extension but not this. --Joy (talk) 16:03, 25 February 2024 (UTC)
- Because {{Infobox mapframe}} was used standalone in the {{Infobox military installation}} template of the page, and the Wikidata entry had both the P625 point and P402 shape attributes (which reserves a space on the Wiki Map servers to save a map), it defaults to only trying to show the shape unless extra parameters are specified such as
- @The Equalizer you fixed it? Thanks, but what was the trick, for future reference? --Joy (talk) 19:52, 24 February 2024 (UTC)
Inserting textual markers
Hi, is there any way to place textual markers? For example to show different faculties of Sharif university we need textual markers, i.e., for:
- a textual marker for Electrical faculty, another for Computer faculty etc. is needed. How can I mark them with pointers? Thanks,
Hooman Mallahzadeh (talk) 07:23, 12 April 2024 (UTC)
- You can't have points that show text on top of the thumbnail map on {{infobox mapframe}} or {{mapframe}} Kartographer based maps, only when they are clicked on in full screen. If you want multiple points, have to use {{mapframe}} only. So:
{{mapframe |frame=yes |plain=yes |width=250|height=200 |type=shape-inverse |id=Q2096604 |title=Shape |description=Desc of shape |frame-coord={{coord|35.703|51.351|display=i}} |zoom=14 |stroke-width=1 |type2=point|coord2={{coord|35.7062|51.3495}}|title2=Point A|description2=Description of point A|marker2=college |type3=point|coord3={{coord|35.7061|51.3510}}|title3=Point B|description3=Description of point B |type4=point|coord4={{coord|35.7020|51.3519}}|title4=Point C|description4=Description of point C|marker4=college }}
- Regards, The Equalizer (talk) 22:36, 12 April 2024 (UTC)
- @The Equalizer I really propose to implement textual markers. And I don't think its implementation would be hard. Such textual markers are really helpful. Do you agree? Hooman Mallahzadeh (talk) 05:38, 13 April 2024 (UTC)
- Alternatively you can use the older map tools at Wikipedia:Maps for Wikipedia. If to be proposed, search Phab first as I am certain this will have been asked before, there likely may even be an open request for it. I am unsure why the powers that be chose to go with the icons only, maybe as going forward it was to be implemented as an update. The Equalizer (talk) 08:13, 13 April 2024 (UTC)
- @The Equalizer The Template:OSM Location map exactly implements the same idea. Thanks, Hooman Mallahzadeh (talk) 08:53, 29 July 2024 (UTC)
- Alternatively you can use the older map tools at Wikipedia:Maps for Wikipedia. If to be proposed, search Phab first as I am certain this will have been asked before, there likely may even be an open request for it. I am unsure why the powers that be chose to go with the icons only, maybe as going forward it was to be implemented as an update. The Equalizer (talk) 08:13, 13 April 2024 (UTC)
- @The Equalizer I really propose to implement textual markers. And I don't think its implementation would be hard. Such textual markers are really helpful. Do you agree? Hooman Mallahzadeh (talk) 05:38, 13 April 2024 (UTC)
Language
I hope this is the right venue. Why do some maps, e.g. at Merkin Hall and Metropolitan Opera House (Lincoln Center) (see right), show some landmarks, e.g. Linkoln Skver, Kolambus Serkl, Hels Kičen, Lenoks Hil …, in a language that may be Slovenian or another Slavic language? -- Michael Bednarek (talk) 12:05, 8 May 2024 (UTC)
- It seems to be a general problem with the Open Street Maps base map. I took the map at Alabama and found the same when navigating to Manhattan. — Jts1882 | talk 13:44, 8 May 2024 (UTC)
- Seems it's an old problem resurfacing. It's being discussed at Wikipedia:Village_pump_(technical)#Serbian_place_names_displayed_on_Manhattan_maps and T230013. — Jts1882 | talk 15:55, 8 May 2024 (UTC)
Second point does not show up
For some reason, everything beyond the first point does not show up:
Strangely, if I insert a dummy shape as the second item, it works:
intforce (talk) 12:36, 30 May 2024 (UTC)
All the points are there when the map is expanded to full screen, it's the thumbnail autozoom that isn't working. By way of example I have reused your first map and manually added zoom and coordinates without a dummy shape parameter, which is a workaround for now. A similar fault with geomasks was reported on Phab couple years back at T305121, have added an extra note about this. Regs, The Equalizer (talk) 22:57, 30 May 2024 (UTC)
- Thank you! intforce (talk) 23:08, 30 May 2024 (UTC)
- One of the chaps on Phabricator spotted that if id1=/type1=/title1= instead of id/type/title it works fine. Not documented clearly on the template page. Regs, The Equalizer (talk) 18:56, 31 May 2024 (UTC)
Is there a way to avoid {{maplink}} appearing as a "frame within a frame" in the infobox? (This seems to be a desktop-specific issue.) Ed [talk] [OMT] 18:54, 22 August 2024 (UTC)
- Is the affected user using a different skin or have bespoke Wikipedia:Common.js and common.css scripts. Regards, The Equalizer (talk) 09:13, 23 August 2024 (UTC)
- With thanks to RoySmith, the map was fixed probably before you saw it, The Equalizer. Looks like it needed |display=inline and |plain=yes parameters to look better. :-) Ed [talk] [OMT] 18:09, 23 August 2024 (UTC)
- As a follow-on to that, is there any way to get maplink to use something other than a mercator projection for the base map? Because north of the arctic circle. RoySmith (talk) 15:35, 3 September 2024 (UTC)
- I doubt it as Mapframe uses the mw:Extension:Kartographer module and only accesses Wikimedia maps which are based on OSM as you're all too well aware I am sure, see https://wiki.openstreetmap.org/wiki/Mercator. Using Mercator has known shortcomings, and that very scenario is acknowledged at Conversation about interactive map use#Pros and Cons of interactive maps. Regs, The Equalizer (talk) 18:59, 3 September 2024 (UTC)
- As a follow-on to that, is there any way to get maplink to use something other than a mercator projection for the base map? Because north of the arctic circle. RoySmith (talk) 15:35, 3 September 2024 (UTC)
- With thanks to RoySmith, the map was fixed probably before you saw it, The Equalizer. Looks like it needed |display=inline and |plain=yes parameters to look better. :-) Ed [talk] [OMT] 18:09, 23 August 2024 (UTC)
"The JSON content is not valid GeoJSON+simplestyle." error message
A new error message has been appearing where mapframe maps used to appear. The error message is "The JSON content is not valid GeoJSON+simplestyle." See this version of the Norfolk Southern–Gregson Street Overpass article, where I believe that a mapframe map used to appear. I wonder if something changed on the MediaWiki end of things, and how it might be addressed. I don't know if this is the talk page where I can find an answer, but I thought I would start here. Anyone? – Jonesey95 (talk) 12:34, 13 September 2024 (UTC)
- Hi there, am a bit late to the party. Looks like you've worked it out and fixed it with the revert. The error usually occurs when the
|map_type
parameter is removed from the infobox code, which is what happened on one of the prior edits during a cleanup. Regs, --The Equalizer (talk) 23:09, 13 September 2024 (UTC)- Thanks for fixing my signature. I thought I had canceled this post entirely. Hmm, it was strange. I don't think my revert at the infobox template did anything to
|map_type=
. A bit of a mystery. – Jonesey95 (talk) 01:27, 14 September 2024 (UTC)
- Thanks for fixing my signature. I thought I had canceled this post entirely. Hmm, it was strange. I don't think my revert at the infobox template did anything to
JSON problem
Hi. I'm trying to use "mapbox|from=Muro_da_Mauá.map" (with the surrounding double curly braces) at en:Mauá_Wall#External_links, but nothing shows up. commons:Data:Muro_da_Mauá.map seems fine (except for the zoom view, which I plan to fix later, adding bboxes). Any ideas, please? (I've exported the JSON becase relation:site is not supported yet.) Thanks! fgnievinski (talk) 02:11, 20 September 2024 (UTC)
- Fixed if you want to check. Regs, The Equalizer (talk) 21:30, 20 September 2024 (UTC)
- Many thanks! What was wrong? I tried to follow mw:Help:Extension:Kartographer/OSM#How_to_get_a_single_object_from_multiple_lines. fgnievinski (talk) 06:40, 21 September 2024 (UTC)
- The json had errors so needed to be rebuilt. The Commons preview tolerates them but Wikipedia doesn't. Regs, The Equalizer (talk) 16:01, 21 September 2024 (UTC)
- Many thanks! What was wrong? I tried to follow mw:Help:Extension:Kartographer/OSM#How_to_get_a_single_object_from_multiple_lines. fgnievinski (talk) 06:40, 21 September 2024 (UTC)
Link to OSM relation
Is it possible for {{mapframe}}
to include a link to the OSM relation, please? Currently I use {{OSM relation}}
separately. Thanks. fgnievinski (talk) 06:55, 21 September 2024 (UTC)
- Use the instructions on Kartographer in your earlier question, and change the type parameter for the shape on OSM to one of the four accepted, boundary is best. After some hours the Wiki maps server will copy the shape over and then you can call it using Mapframe and the Wikidata Q-number. Regs, The Equalizer (talk) 16:07, 21 September 2024 (UTC)
- I meant to ask in the more specific case of using a GEOJSON. The reason is I'm mapping an OSM relation of type "site", which is not currently supported by Wikimedia importer. fgnievinski (talk) 05:33, 23 September 2024 (UTC)
- Such as
{{mapframe|frame=yes|from=Muro_da_Mauá.map}}
? - Regs, The Equalizer (talk) 08:15, 23 September 2024 (UTC)
- Yes, but the external link to OSM could point to the relation https://www.openstreetmap.org/relation/17981605#map=14/-30.02738/-51.22937&layers=N instead of just the center coordinates https://www.openstreetmap.org/#map=14/-30.02738/-51.22937 fgnievinski (talk) 23:56, 23 September 2024 (UTC)
- Such as
- I meant to ask in the more specific case of using a GEOJSON. The reason is I'm mapping an OSM relation of type "site", which is not currently supported by Wikimedia importer. fgnievinski (talk) 05:33, 23 September 2024 (UTC)