![]() | Template:Infobox mapframe is permanently protected from editing because it is a heavily used or highly visible template. 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. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the talk page for discussing improvements to the Infobox mapframe template. |
|
Archives: 1Auto-archiving period: 12 months ![]() |
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to multiple WikiProjects. | |||||||
|
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 (within the |mapframe-custom= parameter of an infobox that uses Module:Infobox mapframe) 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) |
Related pages |
---|
|
|
This page has archives. Sections older than 365 days may be automatically archived by Lowercase sigmabot III when more than 5 sections are present. |
It appears that providing coordinates in the article hides the geomask, even though no geomask parameter was provided. See this version of Scottish Parliament Building (coordinates provided using {{Wikidatacoord}}, no geomask showing) compared to this version (coordinates pulled from Wikidata by the infobox, geomask showing). Is there anyone here who can troubleshoot this? Is {{infobox building}} calling {{infobox mapframe}} incorrectly? – Jonesey95 (talk) 21:42, 1 July 2024 (UTC)
| mapframe-wikidata = yes
as well when coord is used, as per Template:Infobox building#Mapframe maps. Regs, The Equalizer (talk) 22:58, 1 July 2024 (UTC)
I tried adding a caption using |mapframe-caption=
but nothing shows up. Volcanoguy 17:31, 12 July 2024 (UTC)
{{mapframe}}
instead. The Equalizer (talk) 07:36, 14 July 2024 (UTC)
Hi, masking does not work for this code map:
{{Infobox mapframe |shape-fill-opacity=.5|wikidata=yes |zoom=4|frame-height=230 | stroke-width=1 |coord={{WikidataCoord|display=i}}|point = none|shape-fill=#ff0000|geomask=Q794|frame-lat=32|frame-long=54|id =Q132945}}
rendered as:
Iran's map must have been white, but is not in preview mode and after clicking full screen mode. Hooman Mallahzadeh (talk) 15:34, 14 July 2024 (UTC)
Looks fine to me. If I change the mask to Afghanistan (Q889), the white area shows there correctly at preview:
{{Infobox mapframe |shape-fill-opacity=.5|wikidata=yes |zoom=4|frame-height=230 | stroke-width=1 |coord={{WikidataCoord|display=i}}|point = none|shape-fill=#ff0000|geomask=Q889|frame-lat=32|frame-long=54}}
Regards, The Equalizer (talk) 17:11, 14 July 2024 (UTC)
Can someone familiar with this template, take a look at Template:Infobox mapframe/doc/templatedata and Template:Infobox mapframe/doc#TemplateData and see if anything from the /templatedata sub-page is still up to date (and if so, copy it to the /doc page)? Gonnym (talk) 11:30, 26 July 2024 (UTC)
Please see Template talk:Infobox mountain#mapframe implementation. --Joy (talk) 04:14, 1 October 2024 (UTC)
In the sandbox, I changed Module:Infobox mapframe/sandbox at line 216 so that it calls _zoom from Module:Infobox dim to compute the zoom level from an object size. By default, they produce almost the same results (difference in pre-rounded zoom level of about .07, due to slightly different assumptions). The benefit of using Infobox dim._zoom is that it uses the size of the mapframe to compute the zoom. Infobox dim._zoom selects the zoom level so that the object lies fully within the map. If the frame is larger (in pixels), then a higher zoom level is selected.
Any comments or questions about this? — hike395 (talk) 17:54, 7 October 2024 (UTC)
Often times the passing of dimensions into the template is beneficial, but I've seen some cases where it's actually worse than the default, like Colbert River, which is zoomed in too much based on dimensions. --Joy (talk) 15:08, 12 November 2024 (UTC)
I had another odd case, Guaviare River was zoomed out by default so you could see half the continent. Is it because of all the meandering? --Joy (talk) 19:12, 29 November 2024 (UTC)
length
parameter though, only length_mi
or length_km
. If it can't determine the length because it contains words, convert template included, length
used etc, then it defaults to zoom level 10. You can then either use the zoom parameter of course, or use | mapframe-length_km = or | mapframe-length_mi =
. Regs, The Equalizer (talk) 16:26, 30 November 2024 (UTC)
At Talk:Indus River#map frame map, @Fowler&fowler has noticed that the OSM relation for that river does not choose either of the two main headstreams, and therefore our mapframe map shows neither. Is there a syntax to add two more relations to an infobox mapframe map?
Would we be able to e.g. supply a list of two more wikidata Q* items as geomask, or something like that? The geomask example shows a shape that that envelops another shape and there's a shading, which wouldn't seem appropriate in the case of lines, so I'm not sure what to do. --Joy (talk) 23:25, 27 November 2024 (UTC)
This template only works with single features (points, lines, or shapes); use {{maplink}} if more advanced options, such as displaying multiple features, are required.- so that seems quite misleading...
Geomask is pretty useless now if you don't explicitly specify zoom and frame-coordinates due to phab:T305121. For example gives
{{Infobox mapframe|id=Q2087297|geomask=Q1207|stroke-width=2}} (Knife River in North Dakota):
It can be fixed by
{{Infobox mapframe|id=Q2087297|geomask=Q1207|stroke-width=2|frame-coord={{WikidataCoord|Q1207}}|zoom=5}}:
But couldn't the module itself find usable values for zoom and frame-coordinates if none are specified when using geomask? Dipsacus fullonum (talk) 16:17, 4 February 2025 (UTC)
You are invited to join the discussion at Wikipedia:Village pump (technical) § OpenStreetMap Issue in Wikipedia Article. --Ahecht (TALK
PAGE) 16:47, 28 February 2025 (UTC)
From the documentation, it appears that the |width=
of the mapframe image is specified in pixels, but per MOS:IMGSIZE, Except with very good reason, a fixed width in pixels (e.g. 17px) should not be specified, because it ignores the user's base width setting. Thus upright=scaling factor is preferred when it is desired to present an image at other than the default width.
How do I set the mapframe size to match the reader's thumb size preference, as recommended by MOS? – Jonesey95 (talk) 04:40, 12 March 2025 (UTC)
The context of MOS:IMGSIZE is clearly about stand-alone images, not ones in infoboxes. To have uniformly formatted infoboxes should be the standard. -- P 1 9 9 ✉ 18:04, 14 March 2025 (UTC)
upright
parameter instead of explaining how to use pixel sizing. I am asking how to set a mapframe map to match the reader's standard thumb size preference. MOS:IMGSIZE refers to the size of a "lead image". MOS:LEADIMAGE, on the same page, explains the lead image like this: It is common for an article's lead or infobox to carry a representative image. Module:InfoboxImage, which is commonly used to display lead images in infoboxes, has
frameless
and upright
options, which allow lead images in infoboxes to comply with both MOS:IMGSIZE and with readers' preferences. So how do we follow this standard for mapframe maps in infoboxes so that they match the infobox's lead image size? – Jonesey95 (talk) 19:27, 14 March 2025 (UTC)
Can anyone help at template talk:infobox building#Can anyone tell why the map in this article is wildly off?, please? 𝕁𝕄𝔽 (talk) 00:00, 14 March 2025 (UTC)
Can someone help explain why no mapframe is rendering at Template:Infobox military installation/testcases#Rmanj Fortress (mapframe), despite me specifying all the various parameters that are usually working?
The analogous embedded use at the original article Rmanj Fortress does work... --Joy (talk) 21:01, 19 March 2025 (UTC)
|image_map=
parameter. The test case uses mapframe parameters directly. If you edit that test case, you should see red error messages explaining that many of the parameters used there are not supported. That's why those parameters are not doing anything. – Jonesey95 (talk) 15:47, 20 March 2025 (UTC)
I noticed on a few occasions that we render maps of subterranean rivers properly, so a relation doesn't have to be continuous, which is great. I then also found a weird case of Talk:Guanipa River where half the data in the middle of the river flow is just missing, and I don't think it's subterranean, but rather nobody mapped it, probably because of cloud cover in the satellite imagery. However, I couldn't connect the two mapped parts because the web editor zoom settings didn't seem to allow it. Perhaps someone could check that out with a different OSM editor? TIA. --Joy (talk) 17:19, 30 March 2025 (UTC)
Can someone confirm, is it safe to do e.g.:
This will still allow callers to override the mapframe-marker value? IOW we don't have to do:
? --Joy (talk) 09:10, 13 May 2025 (UTC)