Infobox mapframe is of interest to WikiProject Geographical coordinates, which encourages the use of geographical coordinates in Wikipedia. If you would like to participate, please visit the project page, where you can join the project and see a list of open tasks.Geographical coordinatesWikipedia:WikiProject Geographical coordinatesTemplate:WikiProject Geographical coordinatesGeographical coordinates
This template is within the scope of WikiProject Geography, a collaborative effort to improve the coverage of geography on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.GeographyWikipedia:WikiProject GeographyTemplate:WikiProject Geographygeography
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).
If the problem also occurs when using plain <mapframe>...</mapframe> tags, then it should 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)
If the problem only occurs with Wikipedia's template/module, or you're not sure, report it here. (Alternatively, you can try Wikipedia:Village pump (technical))
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?
Only certain OSM relations (those with type=multipolygon, type=route, type=waterway and type=boundary) can be used, and not others like buildings and public transport master routes. See mw:Help:Extension:Kartographer/OSM#Limitation and phab:T156433.
It can take 1 or 2 days after tagging on OSM before the data is available here.
Wikimedia occasionally has problems replicating OSM data (e.g. phab:T218097), or intentionally disables replication due to other problems (e.g. phab:T243609)
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)
Hi, for example in Shiraz article, we have the parameter "shape-fill-opacity" what shades the city. My question is that is there exist any way for shading outside of a city? One solution is using |shape=inverse, but this solution is not good, because the shape is the same but we want to shade outside of city.
So the same as "shape-fill-opacity" parameter, I propose to create a new parameter for "shape-out-fill-opacity". This way, we have a tool to not shade the city itself but shade outside of that city. Thanks, Hooman Mallahzadeh (talk) 08:38, 26 January 2024 (UTC)[reply]
If you use infobox mapframe you have options to change the inner and outer shading:
Is it possible to use this template on a MediaWiki install with no access to wikidata? I attempted to do it by specifying coordinates in the coord parameter but I still get Lua error in Module:Infobox_mapframe at line 185: attempt to index field ‘wikibase’ (a nil value). Redheadkelly (talk) 07:29, 17 February 2024 (UTC)[reply]
Thanks for your reply. I've been busy with other things. I think this extension is to add Wikibase to my install of Mediawiki, which I do not want to do. I'm using Semantic MediaWiki. But I do copy templates & modules from Wikipedia and many of them contain code that queries Wikibase. Sometimes it's easy to rewrite them so that it's not an issue, but sometimes it's not. If this extension gives me the ability to contact the same Wikibase that Wikipedia is using, that's great. But I do see that it does that. Do I have this right? Redheadkelly (talk) 20:58, 14 May 2024 (UTC)[reply]
For one thing, the template {{Coord|34|S|54E}} is malformatted, and I think you want north latitude rather than south. It should be {{Coord|34|N|54|E}}. I've made those changes in your sandbox, but it's still not displaying correctly (though it looks OK in preview). Someone else will have to advise you further. Deor (talk) 14:35, 25 February 2024 (UTC)[reply]
@Deor I found the solution myself. With parameters |frame-lat=29.67|frame-long=52.52, the problem is resolved.
You are using the embedded parameter in the mountain template to add the mapframe, but it is a bit of a hack to directly add a caption like that. A full integration which creates an automatic map and allows the caption parameter would need the mountain template editing by a template editor - the full way to do this is described here: Module:Infobox mapframe. Regards, The Equalizer (talk) 22:46, 14 July 2024 (UTC)[reply]
New bug for masking in preview and full screen modes
For anyone else reading, there's a followup there still about how to format the default zoom, and some Lua error. --Joy (talk) 08:30, 2 October 2024 (UTC)[reply]
Use Infobox dim to compute zoom?
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.
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)[reply]
Not scientific, but measuring the length of the river as the crow flies using two freely map sources gives a length of at least 15km between source and mouth not even taking into account the meanders, so why 12.6 is stated I don't know, it needs challenging and a citation. Adding that adjusted length into the infobox sets the map to an expected zoom showing the full length of the course. Regs, The Equalizer (talk) 23:26, 12 November 2024 (UTC)[reply]
Not quite. The river template takes the length of the object and feeds that to the length parameter for the map. It doesn't take the river 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)[reply]
@Joy instead of recoding, couldn't we just add a note to length* parameters of the infobox river template that the mapframe-length* parameters should ideally be additionally populated with the straight line length so that the maps display properly (or use the zoom parameter). Regs, The Equalizer (talk) 11:51, 3 December 2024 (UTC)[reply]
I don't know if straight line length is a parameter typically found in sources for rivers, I never saw it myself. At the same time, now that I think about it, what happens if a river is also generally U-shaped or L-shaped, which happens reasonably often - do we still call this "straight line length", or is it actually just some sort of an approximation... maybe in those cases it would make sense to tune the basin size, at the same time I don't know the logic, does length_km2 take precedence over basin_size_km2 when deciding on zoom? --Joy (talk) 13:56, 3 December 2024 (UTC)[reply]
showing two extra relations in addition to the wikidata-attached main one
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)[reply]
Thanks. I wasn't aware of this, and I went to check the documentation, but couldn't find anything about it. The template doc still says: 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...