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 module is within the scope of WikiProject Maps, a collaborative effort to improve the coverage of Maps and Cartography 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.MapsWikipedia:WikiProject MapsTemplate:WikiProject MapsMaps
Location map 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
To help centralize discussions and keep related topics together, several talk pages redirect here.
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.
Currently, an unsightly black box appears behind the red dot of the location map on the Android app whenever the map is inside of an infobox (such as in Plymouth Rock). This is because of styles specific to the mw:Page Content Service (PCS), which serves our content on the apps. Specifically, the <div> tags which wrap the dot inherit the background color from elements up in the tree, which happens to have their backgrounds set to dark/black when the reader requests it and when an infobox wraps the location map. There's a very obscurely-placed way to disable this (phab:T236137) that's officially supported, which is adding the "notheme" class to any element that shouldn't be styled by PCS. By adding the class to the outer div (div with class od), it suppresses the background color from being set to it and its children divs (which explicitly inherits the infobox's cell background color by default).
This change is visible only for the app view on dark/black mode. You will have to open Special:PermanentLink/1192790784 on the Wikipedia apps with dark/black mode enabled or view the Mobile HTML directly in your browser (preview) to see the difference.
"Show both" instead of "Show all" when there's two maps
I think it would be a nice detail and more grammatically correct when there's two maps that can be flipped between, instead of an option that says "Show all" it should say "Show both". Akeosnhaoe (talk) 08:50, 24 January 2024 (UTC)[reply]
@User:Akeosnhaoe I have been termed "Grammar police" (a label I do NOT disdain), as well as "Grammar ... (something beginning with N)." My thought on this is, why unnecessarily complicate things for a nicety of usage? Uporządnicki (talk) 22:24, 18 February 2024 (UTC)[reply]
By the way, "... when there's two maps." That is to say, "... when there IS two maps." Last time I checked, there ISN'T two of anything in the world or out of it. Uporządnicki (talk) 22:29, 18 February 2024 (UTC)[reply]
That simple, huh? I went to <div style="text-align:center"> map code </div> lengths and all it took was a little {{center}}. Funny how the simplest solutions are the hardest to find. Qwerty284651 (talk) 18:59, 11 February 2024 (UTC)[reply]
Center aligned label?
Hi, I've searched the talk page archives for this, but I couldn't find a solution. Is it possible to place a label exactly over the point where the mark would be? I'm trying to make a label map of Afghan provinces here on my sandbox, but it seems that the label will always be off-center, even if you move the "positon" parameter to "top" or "bottom". It would be useful if "center" were an option for this parameter. I'm trying to see if location maps could be used to make something like image-label maps such as at Template:Bulgaria Provinces, which would be much easier considering it uses coordinates instead of pixels of the image. — RAGentry(talk)(contributions)22:17, 18 February 2024 (UTC)[reply]
@Wtmitchell: Google shows you the right location because you're searching by name, but the coords are more like 18.62 and -88.15 (pin dropped near the location in Google maps). Ponor (talk) 09:58, 30 March 2024 (UTC)[reply]
I am deactivating this request until there is a clear change request. The phrase "Location Map" does not appear in the module's code. – Jonesey95 (talk) 21:30, 10 April 2024 (UTC)[reply]
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request.
I found a subtle bug in the way the markers/labels are created. If a marker has a link, the anchor tag seems to inherit the font size from the user skin, not from the label_size. This is problematic for small markers, especially clustered ones. The anchor tag bounding box may be taller than the marker and label themselves, thus it may obstruct other marker/label links behind it. You can compare the difference between these 2 map versions: without fix vs fixed. Look for the Orlivka red marker which is vertically sandwiched by two villages. They are NW of Avdiivka which is NW of Donetsk. In the old version, the Orlivka marker link is barely clickable as Tonenke and Semenivka obstruct it. In the new version, the anchor follows the marker shape.
The proposed fix is written in the sandbox. It simply moves the css font-size definition from the label div to the outer div which also includes the marker div. Perhaps the only downside would be if the label_size was much bigger than the marksize, causing even more obstruction. Maybe forcing the font-size of the marker to be very small could help? What do you think? Alexis Coutinho (talk) [ping me]06:43, 27 April 2024 (UTC)[reply]
I've made another bugfix, but this time for Module:Location map/multi. The problem was pretty simple: when using the load function for multi map templates, the radio buttons wouldn't show up despite the individual maps being correctly wrapped in <div class="switcher-container">. This was because the autoSwitcherLabel option was being set on args, which isn't passed to locmap.bottom (dataModule.containerArgs is instead). Effectively, it wasn't being read. If containerArgs wasn't read-only, then the new flag could be set directly. Therefore, I believe the neatest way to pass this flag to locmap.bottom is to make a shallow copy of containerArgs, modify it, and then pass it instead. Alexis Coutinho (talk) [ping me]23:27, 27 April 2024 (UTC)[reply]
The map labels in dark mode have a black background and black text. The background should either be transparent on maps where the label text colour has sufficient contrast with the background or white so the black text has sufficient contrast. Here are three examples from Moulins, Allier, and Con Mine.
{{Location map~}}|background= is sometimes ignored when |position=bottom or |position=top
Example here in which the label background color is ignored for one element:
{{Location map~|France Paris and inner ring|lat=48.8737|long=2.2950|background = #ffcc7777|label=<div style="font-size:70%;">'''[[Arc de Triomphe]]'''<br />'''[[Place Charles de Gaulle]]'''</div>|position=top}}
In the above example, the color has partial alpha but that's irrelevant to the issue: I previewed |background=#ffcc77 and/or |position=bottom with same problem; changing |position=left or |position=right work OK. likewise changing other elements' |position= broke them.
According to the monthly parameter usage report, the |float= had only 1 use, which I removed. Furthermore, do we even need the CSS float:right when it's mostly in infoboxes, which are narrow? 142.113.140.146 (talk) 08:04, 1 August 2024 (UTC)[reply]
So I tested on mobile and saw the display. It is unclear why the controls are to the left of the image. I haven't heard of any UI pattern like this layout. On mobile, we should be spacing things out on the page with plenty of padding, not trying to cram everything on one row. 142.113.140.146 (talk) 19:56, 1 August 2024 (UTC)[reply]
Firstly, 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.
Firstly, 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.
Hi, 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)[reply]