Hi. Look at this please: The entry
| Module:Location map is indefinitely protected from editing as 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 Location map module. |
|
| Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11Auto-archiving period: 12 months |
| This module does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
| |||||||||||||||
| To help centralize discussions and keep related topics together, several talk pages redirect here. |
| Text or other creative content from this version of Template:Location map/Creating a new map definition was copied or moved into Template:Location map data documentation/doc with this edit on 15 February 2024. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
Hi. Look at this please: The entry
And these are the provided links in the entry: This, and this. Aminabzz (talk) 13:42, 27 February 2025 (UTC)
You are invited to join the discussion at Template talk:Wikidata location map § fallback default map vs. mapframe. -- Joy (talk) 15:26, 16 August 2025 (UTC)
You are invited to join the discussion at Template talk:MergedMap. -- Joy (talk) 12:36, 27 November 2025 (UTC)
This map requires different coordinates for image and image1. I tried adding the top1/right1/... parameters (for the relief map) but they don't work. Maybe someone will be able to prepare a module with different coordinates for both images. Malarz pl (talk) 23:25, 29 December 2025 (UTC)
This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
In the function markLabelDiv, append ":addClass'notheme mw-no-invert')" to the line that instantiates builder.
Right now, the font color of the marker label is inverted in dark mode, which makes it completely unreadable since the underlying image is not inverted. So either the image should be inverted or the font should not be inverted. I'm not sure whether the former is possible, so I think the simplest solution is to add the classes notheme and mw-no-invert to the label div, which cause it to remain black even in dark mode. Justin Kunimune (talk) 20:30, 30 December 2025 (UTC)
Not done for now To avoid possible misinterpretation, please make the requested change in the sandbox, then check the test-cases. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 13:43, 31 December 2025 (UTC)
This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Description of suggested change: Append ":addClass('notheme mw-no-invert')" to line 326, to ensure the label text color is not inverted in dark mode when using the WikimediaUI Dark Mode gadget, thus matching the behavior of the underlying image and ensuring good contrast.
I've implemented this in the sandbox, so you can see the improved behavior by viewing the test cases in a browser with dark mode the Dark Mode gadget enabled.
Diff:
| − | local builder = mw.html.create('div')
:cssText('width:' .. label_width .. 'em') | + | local builder = mw.html.create('div')
:cssText('width:' .. label_width .. 'em')
:addClass('notheme mw-no-invert') |
Justin Kunimune (talk) 02:26, 3 January 2026 (UTC)
Right now when you click on a location map, it takes you to the file page for the underlying map. I think this is really unintuitive and problematic for accessibility, as many users will want to enlarge the map. I think that instead, when you click on it, it should open an interactive Kartographer map. I've mocked up a new version of Location map that does this, as can be seen to the right.
Do people here think that would be a good change to make, or have alternative ideas for how it might work? For example, another user mocked up a version that enlarges the location map rather than opening a Kartographer map, but personally I like my version because I feel that it combines the best of Location map and Maplink: a clean hand-made map for small scales, and a more detailed interactive map for large scales.
Justin Kunimune (talk) 16:38, 11 January 2026 (UTC)
This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Make it so that clicking on the image opens an interactive Kartographer map.
This is the change I described in #Making all location maps embed maplinks, which I've now implemented in the sandbox. I solicited feedback here and on WT:WikiProject Maps, and haven't heard anything for or against, so I'm presuming I have consensus until someone says otherwise.
You can check the behavior in the test cases. If you click on the sandbox version of the map you should see the Kartographer map, as opposed to the current version which takes you to the file page; otherwise as far as I can tell there is no difference in behavior. Editors won't need to change anything about how they use the template, but it does create three new optional arguments – maplink_marker, maplink_marker_size, and maplink_marker_color – which can be used to customize the appearance of the marker in the interactive map.
You can see the diff here:
As far as changes to the actual code, the main thing is that when the maplink argument is empty, I construct and preprocess a <maplink/> tag and wrap the image in it. I moved the part that parses the coordinate arguments into a separate function, getCoordinates, so that the same coordinates can be used in both the mark placement and Kartographer.
Justin Kunimune (talk) 21:48, 31 January 2026 (UTC)
First of all, I love Kartographer, I've myself brought it to thousands of articles. Unfortunatelly, I don't think this is the way to go, at least not until Kartographer gets more layers, such as different terrain options. The red pog not appearing when you click on a location map shouldn't be too hard to fix, if people choose to do so. That's a bug. But clicking on a relief map, and getting something completely different is a WP:SURPRISE, so a NO from me. One day we'll be able to replace Location maps with Kartographer. Let's all support m:Community Wishlist/W323. Ponor (talk) 01:03, 5 February 2026 (UTC)
This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Make it so that clicking on the image opens an interactive Kartographer map.
I'm re-requesting the change described above, with some modifications. See the sandbox for the exact updated code that I'm requesting.
I posted this at Village pump (proposals), and I think we achieved consensus for implementing this (there was one voice of opposition, but the rest of the !votes and comments were all supportive). I did make two changes to my proposal based on that discussion:
While I didn't call this out last time, I should note that while all existing maps will work fine with this change without any action from any other editors, there are two new functionalities that infobox editors can use that I will note in the documentation if this change goes into effect:
maplink_marker, maplink_marker_size, and maplink_marker_color. These work the same way as the marker, marker_size, and marker_color parameters in {{Maplink}}.publicdomain. If set to true, this suppresses the credit link in the lower right-hand corner. This can be used to reduce visual clutter for PD and CC0 maps that don't require attribution. It also works with alternative maps; you can mark image1 as PD with publicdomain1=true, you can mark image2 as PD with publicdomain2=true, and cetera.See the test cases to see how the new button and credit link look. Note especially the maps of Brčko and Uelen where you can see the button move to the left to make space for the marker.
Justin Kunimune (talk) 22:45, 23 February 2026 (UTC)
#invoke:, Module:Location map/multi also imports this module via require() (specifically it calls top() to generate the base map, but without a latitude or longitude since there are multiple sets; I've now set it to safely skip over the embedded maplink code when this happens). I've searched for all modules that require this one, and there seem to be two: Module:Location map/multi and Module:Infobox military conflict.For example, how can I use File:Central Europe location map 2.svg in {Location map many | Europe}? --Altenmann >talk 22:51, 14 February 2026 (UTC)
More generally, can I specify top+bottom+left+right coordinates to display only a part of a standard locator map? --Altenmann >talk 22:51, 14 February 2026 (UTC)
So |AlternativeMap= is the one parameter I see here that does not conform for MOS:INFOBOXNAME... Namely the param should be |alternative_map=. Now obviously with so many uses, not going to remove the existing... But any objection to allowing for the arguably correct form of the param to also work? Zackmann (Talk to me/What I been doing) 00:50, 22 February 2026 (UTC)
This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
It says "Lua error in Module:Location_map at line 223: attempt to compare number with nil." I don't know Lua, so that's all I can say really, sorry. Raskuly (talk) 03:22, 5 March 2026 (UTC)
notpageimage markupThe magnify icon currently has broken markup. For example, the Yellowstone map on the documentation page has:
<div class="magnify"><a href="/wiki/File:Usa_edcp_relief_location_map.png" title="File:Usa edcp relief location map.png">class=notpageimage| </a></div>
This is the corresponding code in the module:
retval = retval .. '<div class="thumbcaption"><div class="magnify">[[:File:' .. getContainerImage(args, map) .. '|class=notpageimage| ]]</div>' .. args.caption .. '</div>'
Opencooper (talk) 08:29, 9 March 2026 (UTC)
[[:File: code is not image syntax, but link syntax, so the class= gets interpreted as piped wikilink text. The solution would be to add that class to the generated link directly somehow.The documentation for {{Location map}} says that |caption= "will cause the map to be displayed with a frame", and many examples there show framed maps. However, this currently does not seem to work in articles. Moreover, if you click "edit" on "Template documentation" and then "Show preview" (without making any changes), all the frames are gone, and some maps that were right-floating become not floating at all. Apparently, something was broken recently. Please check and correct. — Mikhail Ryazanov (talk) 23:51, 21 May 2026 (UTC)
tright, which is deprecated and since ~yesterday is dropper from the CSS by default (see phab:T426452 and this commit). More curious is that the class thumbinner is also not defined when I do the preview. Manually removing these two in the browser developer tools makes the rendered documentation appear broken the same way as I see in the preview. So for tright, it definitely must be replaced in the module code by floatright (and similarly for all other alignment classes), but I didn't dig deeper regarding thumbinner. — Mikhail Ryazanov (talk) 05:33, 23 May 2026 (UTC)
thumbinner problem? phab:T426452 has a recent comment referring to mw:Parsoid/Parser Unification/Media structure/FAQ, which seems relevant. — Mikhail Ryazanov (talk) 10:27, 26 May 2026 (UTC)
thumbinner, and the ticket doesn't really explain it to me. Maybe someone else here will understand. – Jonesey95 (talk) 13:23, 26 May 2026 (UTC)Currently the display is extremely bright for night mode and any point made on the map becomes essentially invisible. The div forces a white background and black frame which overwrites any browsers night mode. Here's a fix:
<div style="background-color: var(--background-color-base, #ffffff); border: 1px solid var(--border-color-base, #000000); padding: 2px; margin: 0 auto; text-align: left; width: 260px; position: relative;">
I'm not fluent in wikitext so let me know if I'm missing something here.
Dunkleosteus77 (talk) 23:37, 25 May 2026 (UTC)
Looking at adding Module:Check for unknown parameters to this Module and its templates. Running up against a few issues that I want some feedback on before proceeding. As this has multiple entry points ({{Location map}}, {{Location map~}}, {{Location map+}}, etc.) I am wondering the following:
@Frietjes, Pppery, Izno, Jonesey95, and Hike395: and anyone else, please share your thoughts! Zackmann (Talk to me/What I been doing) 23:52, 26 May 2026 (UTC)
The location map in the link https://es.wikipedia.org/wiki/Segunda_Federaci%C3%B3n_2025-26#Grupo_I is 500 pixels wide. On a mobile browser the map is not scrollable and parts of it are hidden from view. How could the map be scrolled? ~2026-32427-52 (talk) 06:13, 31 May 2026 (UTC)
I have started a discussion here about a proposal to refactor the way Template:Location map works in Infoboxes. PLEASE join the discussion. Need lots of feedback on this one. Zackmann (Talk to me/What I been doing) 17:40, 22 June 2026 (UTC)
I have long been kicking around the idea of refactoring the way that Template:Location map works specifically in infoboxes and want to solicit some feedback on the idea.
|map=, |pushpin_map=, |location_map=, |locmapin= and |map_type=. This makes it very difficult to go from one Infobox to another as you never know what parameters to use. The same issue applies to other aspects of the pushpin map such as the label, caption, label position, relief, etc. If you compare this to Template:Infobox mapframe, every single Infobox that uses a mapframe uses the exact same parameter names. Want to change the marker? That will always be set via |maprame-marker=. The zoom? Always |mapframe-zoom=. Doesn't matter what Infobox you are on.{{#invoke:Location map|infobox_location_map}}, that would allow for calling the location map (aka the pushpin map) in an Infobox and keeping the parameter names the same across every Infobox. That way, whether you are using {{Infobox settlement}}, {{Infobox airport}} or {{Infobox military installation}} the parameter names would all be the same. Just like Template:Infobox mapframe, I would also create a template for documentation (see {{Infobox mapframe/doc/parameters}}) so that documentation would be consistent across Infoboxes as well.
Courtesy pings: Joy, JMF, Jonesey95, Hike395, Primefac, Gonnym, Jessicapierce, GreenLipstickLesbian, Johnuniq, Phuzion, Plastikspork who I feel may have opinions on this, but of course ALL inputs welcome!! --Zackmann (Talk to me/What I been doing) 17:39, 22 June 2026 (UTC)
{{{track_map}}} and the church infobox uses {{{monastery map}}}.{{{old parameter}}}, which is no longer supported, please use {{{other parameter}}} instead." The current wording of "deprecated parameters" is somewhat unclear to an amateur editing an infobox. In unknown parameter cleanup, we see this somewhat often. Someone sees a parameter named {{{foobar}}} and wants the label on it to read Foobars, not realizing that the {{{label}}} has {{Pluralize from text}} applied to it. They change {{{foobar}}} to {{{foobars}}} and the article gets chucked into an "unknown parameters" maintenance category.new entry pointmay ultimately not be needed. The tricky part is how to make this new idea work without breaking anything else. That is why I might opt for a new entry point so that I can use the existing code but also customize it to fit. Gotta make sure that uses of {{Location map}} that are not in an Infobox continue to work when this is all done. Not 100% certain as to the how just yet, but I have a number of ideas.
|image_size= still.|pushpin_map_size= much easier as all we have to do is remove support from the new entry point for this and poof, all transclusions no longer use it. I just think that removal warrants further discussion. Zackmann (Talk to me/What I been doing) 23:43, 22 June 2026 (UTC)NOTE: @Snævar, Justinkunimune, JMF, Phuzion, Primefac, and Jessicapierce:: I have moved this discussion, please update your watchlist if you wish to follow the discussion. Zackmann (Talk to me/What I been doing) 19:55, 23 June 2026 (UTC)
As there seemed to be interest in this solution, I have started working on it in the sandbox: Module:Location_map/sandbox#L-514. Far from done, but making great headway.
--Zackmann (Talk to me/What I been doing) 20:02, 23 June 2026 (UTC)
|pushpin_map=, |pushpin_caption=, etc... Zackmann (Talk to me/What I been doing) 20:55, 23 June 2026 (UTC)
So I found an issue with what I have implemented... In short, {{location map}} automatically pulls coordinates from Wikidata when no other coordinates are supplied. This only works on articles with existing Wikidata coords (I could not find a supported |qid=... param that works for testing). So If you go to New York City and add the following to the top of the page: {{Location map|World}} {{Infobox tree|pushpin_map = World }} you will see the first one produces a map, the second one does not. So I need to add a call to Wikidata. Will get on this tomorrow.... --Zackmann (Talk to me/What I been doing) 05:13, 16 July 2026 (UTC)
This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Please remove the coordinates (latitude and longitude) with no given values in lines 425 and line 426 Rangoon creeper (talk) 06:19, 13 July 2026 (UTC)
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.