Module talk:Location map
![]() | Module:Location map 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 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 and/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. |
Related pages |
---|
Urgent: Please fix this template for printed content Module:Location map/styles.css.
editFirstly, apologies for writing in English if this is not your first language (this is an automated message).
This template has been detected as one of 436 pages using styles that break the page when printed when the user is using dark mode. The fix is very straightforward - all your styles relating to dark mode must be scoped to. Since there is a high risk of this templates being copied to other wikis it is important this notice is acted on ASAP.
To fix this:
- Update `@media (prefers-color-scheme: dark` to `@media screen and (prefers-color-scheme: dark`
- Wrap any styles relating to `html.skin-theme-clientpref-night` in `@media screen`
If this message has not been acted on in 7 days, this will be fixed by an automated script. Thank you for your help fixing this important issue.
For any questions feel free to ask them at phab:T369874.
Jon (WMF) (talk) 18:22, 2 August 2024 (UTC) on behalf of the web team.
- Done. Izno (talk) 22:09, 3 August 2024 (UTC)
Location Map with only part of a file
editHi, so is it possible with this template to like display for example the map of germany and cut the part that isn't of interest ? For context I'm creating french pages for German Regionalligen and from 2012 til now it's fine since all 5 groups have ___location maps i can use, but for the period when it was divided into 3 groups there is no ___location map file for now and instead of creating new files (cuz i don't really know how to) i wondered if i can just used ___location map with the full germany map file, and then ask it to for example cut the south when showing regionalliga nord, then cut the north when showing regionalliga süd and then cut the east when showing regionalliga west. If it's not possible then I'll go ask around on how to edit svg maps and create ___location maps ig TheÆtherPlayer (talk) 13:40, 7 October 2024 (UTC)
Bad contrast
editHi. 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)
How do I set the Location map width to the reader's thumb size preference?
editFrom the documentation, it appears that the |width=
of the ___location map 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 ___location map size to match the reader's thumb size preference, as recommended by MOS? – Jonesey95 (talk) 04:44, 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:03, 14 March 2025 (UTC)
- I agree that a uniform image width should be the standard, which is why I am asking how to set a ___location 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, hasframeless
andupright
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 ___location maps so that they match the infobox's lead image size? – Jonesey95 (talk) 19:26, 14 March 2025 (UTC)
- I agree that a uniform image width should be the standard, which is why I am asking how to set a ___location 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:
Export
editWhat's the best way to export the resulting map, please? Motivation: Template_talk:Location_map-line#Use_in_Wikidata. fgnievinski (talk) 14:06, 15 March 2025 (UTC)
Proposal: Add Custom Label Positioning in Module:Location map
editI would like to propose an enhancement to Module:Location map
that would allow for more precise label positioning. Currently, the module supports basic label positions (top
, bottom
, left
, right
), but does not include options for diagonal placements like northeast
, northwest
, southeast
, or southwest
.
Suggested Changes:
edit- Expand the
|position=
argument to recognize and support:northeast
(ne
)northwest
(nw
)southeast
(se
)southwest
(sw
)
Benefits:
edit- Greater Precision: Labels can be positioned more naturally relative to markers, reducing overlap and improving clarity.
- Consistency: Many mapping tools and templates already support compass-based positioning, making this a logical extension.
- Improved Readability: This would allow editors to optimize label placement in cases where the default positions (
top
,bottom
,left
,right
) do not work well.
Possible Implementation:
edit- Modify the
|position=
handling inModule:Location map
to recognize the additional options and adjust label offsets accordingly. - Use a simple logic-based adjustment to move the label diagonally when a compass-based position is selected.
This enhancement would improve the flexibility and usability of ___location maps across Wikipedia. I welcome feedback and discussion on this proposal. Abhiramakella (talk) 23:42, 2 April 2025 (UTC)
- I would find this very helpful, particularly for locations that are very close to each other that the editor wishes to label. I would suggest alternatively that every label could have a certain "offset" parameter, in pixels, on top of the existing position parameter. This would specify the offset from a default position so editors could adjust the label to be anywhere they wish on the map. LivinAWestLife (talk) 18:41, 8 August 2025 (UTC)
@LivinAWestLife: Adding some vertical offset to left- and right-positioned labels isn't too hard (Special:Diff/1305013356/1305042106). I don't think we need it for top- and bottom-positioned ones, and I'd advise against adding any left-right offset to those, as people tend to fine tune the absolute positions to what looks good on their screens, disregarding many other different devices and font sizes.
The new parameter is top_offset
, available in {{Location map/sandbox |top_offset=}}
current | top_offset=0 | SW: top_ofset=−1 | NW: top_offset=+1 |
---|---|---|---|
current | top_offset=0 | NE: top_ofset=−0.8 | SE: top_offset=+0.6 |
Let me know what you think! Ponor (talk) 18:51, 9 August 2025 (UTC)
- Hi, this looks like it would be very useful, thank you! I hope implementing it wasn't very hard. I can understand why you wouldn't want to be able to fine tuning the absolute positions if it makes the display worse on certain screens. I will try it out now. LivinAWestLife (talk) 19:37, 9 August 2025 (UTC)
Automatic color mode bug
editI'm seeing a bug with text background color for annotations on ___location maps in articles, but not in the docs. Both logged-in and -out. E.g. screenshot at phab:F59386868 of the random article Fechenheim (and same elsewhere). But the examples in Template:Location_map all work properly(!?). I'm not sure where the bug is coming from, whether it's in Module:Location map/styles.css or elsewhere. I hope those clues help! Quiddity (talk) 02:12, 25 April 2025 (UTC)
Changing template name to "Template:Pushpin Location map"
editHi, just like Template:OSM Location map, I think it is better to mention the type of Location map, which is in this case is pushpin. So I propose to move this article to Template:Pushpin Location map. Thanks, Hooman Mallahzadeh (talk) 03:02, 1 May 2025 (UTC)
- The pushpin (pog) is just the default marker. Templates like {{Infobox airport}} use a different image file to show locations. There is a whole family of ___location maps, not just this module and template; I might support a name change if their name was something like "LM", but "Location map" is reasonably descriptive. – Jonesey95 (talk) 15:16, 1 May 2025 (UTC)
Edit request 13 May 2025
edit![]() | This edit request to Module:Location map/styles.css has been answered. Set the |answered= parameter to no to reactivate your request. |
Description of suggested change: the whole map section, including the caption, gets affected by the grayscaling effect on lines 66 and 79 in styles.css, which causes some weird coloring (see [1])
Diff:
− | html.skin-theme-clientpref-night .locmap {
filter: grayscale(0.6);
} | + | html.skin-theme-clientpref-night .locmap img {
filter: grayscale(0.6);
} |
əkrəm. 18:06, 13 May 2025 (UTC)
Done Izno (talk) 23:48, 23 May 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)