Module talk:Mapframe

This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 20:36, 8 August 2025 (Archiving 1 discussion(s) to Module talk:Mapframe/Archive 2) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Latest comment: 1 month ago by The Equalizer in topic Inconsistent map box

Template not functioning in Bukit Dumbar

Maplink in Bukit Dumbar's infobox was OK a few days back, but became blank by yesterday. Q# was already linked from the start. I attempted a boundary fix in OSM a few hours ago. Not sure if anyone here could help on this? hundenvonPG (talk) 06:32, 21 March 2025 (UTC)Reply

The lag syncing the diffs from OSM to wikimaps seems really high but is within tolerance - may need to wait it out. The shape of the ___location seems to be in place otherwise. I updated the page to create a basic map until then. Regs, The Equalizer (talk) 11:01, 21 March 2025 (UTC)Reply
Thanks The Equalizer   hundenvonPG (talk) 04:34, 23 March 2025 (UTC)Reply

Thumbnail rendering issue in José Salvador Alvarenga

Point 1 and most of the line not visible, something to do with the 180th meridian line. Same issue on the fr and zh pages. Also is there a way to make the 180 line not visible? Sohryu Asuka Langley Not Shikinami (talk) 05:28, 29 April 2025 (UTC)Reply

@Sohryu Asuka Langley Not Shikinami This is a bug. Only happens in "View mode". But I propose you to take some screenshot of OSM map, for this track, modify that and upload it using template OpenStreetMap in WikiCommons. Best regards. Hooman Mallahzadeh (talk) 06:19, 29 April 2025 (UTC)Reply

How not dispay top right square for "Show in full screen"

Hi, is there anyway to avoid showing top right while square ([ ]) for "Show in full screen"? Sometime this square disrupts the map. Thanks, Hooman Mallahzadeh (talk) 13:41, 5 May 2025 (UTC)Reply

Don't think you can. Just increase the height of the frame to accommodate the map. Regs, The Equalizer (talk) 20:10, 7 May 2025 (UTC)Reply
@The Equalizer Implementation of "Hide" does not seem so hard. Just add an argument named "|hide square=yes" and then in the span of OSM map apply this style "display: none;".
Hiding this square is very useful for many Wikipedia maps, especially for small ones. So it worths implementation. Thanks, Hooman Mallahzadeh (talk) 04:01, 8 May 2025 (UTC)Reply
I thought the box is also a subtle hint that it's a clickthrough and scalable, not just a static picture. But propose the removal via Phab if desired. The Equalizer (talk) 18:34, 8 May 2025 (UTC)Reply
@The Equalizer No need for request of Phabricator. We should set "display:none;" CSS property for ".mw-kartographer-fullScreen" class. I tested it successfully in the inspector view my inspector of my browser.
I think it can be implemented by modifying this template only.
Line 1108 add
		displaysquare = util.getParameterValue(args, "displaySquare") or L10n.defaults.displaySquare,
and line 962 add
if options.displaySquare == "no" then
    local whiteSquare = assert(document:getElementsByClassName("mw-kartographer-fullScreen"))
	whiteSquare:css("display", "none")

Hooman Mallahzadeh (talk) 04:03, 9 May 2025 (UTC)Reply

I think this square is not required at all, therefore we can remove it as a default setting. Because there exists a tooltip for this purpose. Hooman Mallahzadeh (talk) 14:27, 9 May 2025 (UTC)Reply

Failure to set frame-align=none

As the alignment of thumbnail images can be set to none (see Help:Pictures), its reasonable to let this module get support as well. Unfortunately, if I set |frame-align=none, I see this notice: <mapframe>: Attribute "align" has an invalid value. -- Great Brightstar (talk) 10:29, 20 May 2025 (UTC)Reply

This map does not allow thumbnail-sized images yet. See this archived discussion from 2023, and a similar archived discussion from March 2025. – Jonesey95 (talk) 00:48, 22 May 2025 (UTC)Reply

Edit request 28 May 2025

Description of suggested change: On line 94, change "paramter" to "parameter."

Diff:

valid values for type paramter
+
valid values for type parameter

ShoneBrooks (talk) 15:00, 28 May 2025 (UTC)Reply

  Completed. P.I. Ellsworth , ed. put'er there 20:29, 28 May 2025 (UTC)Reply

Display in title

There's this comment in the code, saying "[display=title] makes maplink wikitext that will be located in the top-right of the title of the page (the same place where coords with display=title are positioned)." That does not seem to work: the styles associated with id=coordinates cannot do that. Is this option even useful? I'm wondering if it should be removed from the template's documentation, it seems misleading. Ponor (talk) 20:30, 10 June 2025 (UTC)Reply

This edit will put the display=title marker in the indicator area, which seems to work for all desktop skins, as can be seen at Template:Maplink/sandbox (as long as the module sandbox change is on). Is that what we want? Ponor (talk) 21:21, 10 June 2025 (UTC)Reply

A naive search shows that there aren't that many articles that use {{mapframe|display=title}}, maybe no more than 50. So I think it's safe to make this change. With it

  • the module and template will do what they're supposed to do with |display=title: the inline+title markers won't be shown next to each other in Vector-2022 ([1]) nor the 'title' one will be placed on top of the infobox in Vector ([2])
  • the 'title' marker will be placed as the last of the indicators (the code added is mostly from that page)
  • the resulting html code seems clean, and in line with what {{coord}} already does

Thanks, Ponor (talk) 13:50, 11 June 2025 (UTC)Reply

  Done Thanks, I had noticed this being broken a while ago and just did not want to deal with it at all. Izno (talk) 02:48, 28 June 2025 (UTC)Reply

Inconsistent map box

The same source produces a correct result on User:OceanLoop/sandbox/map but not Indian Creek (Elwha River tributary): the frame is not positioned properly. Does anyone know why this happens? OceanLoop (talk) 00:55, 24 July 2025 (UTC)Reply

Fixed. Regs, The Equalizer (talk) 19:10, 24 July 2025 (UTC)Reply