Content deleted Content added
m Archiving 2 discussion(s) to Module talk:Location map/Archive 11) (bot |
m Archiving 2 discussion(s) to Module talk:Location map/Archive 11) (bot ย |
||
(21 intermediate revisions by 11 users not shown) | |||
Line 12:
{{Copied |from=Template:Location map/Creating a new map definition |from_oldid=1207855218 |to=Template:Location map data documentation/doc |date=15 February 2024 |afd= |merge= |diff= |to_diff=1207858852 |to_oldid=1207854611 }}
{{Lua sidebar}}
== Urgent: Please fix this template for printed content [[Module:Location map/styles.css]]. ==
Line 159 โถ 55:
What's the best way to export the resulting map, please? Motivation: [[Template_talk:Location_map-line#Use_in_Wikidata]]. [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 14:06, 15 March 2025 (UTC)
== Proposal: Add Custom Label Positioning in Module:Location map ==
I would like to propose an enhancement to <code>Module:Location map</code> that would allow for more precise label positioning. Currently, the module supports basic label positions (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code>), but does not include options for diagonal placements like <code>northeast</code>, <code>northwest</code>, <code>southeast</code>, or <code>southwest</code>.
=== Suggested Changes: ===
* Expand the {{para|position}} argument to recognize and support:
** <code>northeast</code> (<code>ne</code>)
** <code>northwest</code> (<code>nw</code>)
** <code>southeast</code> (<code>se</code>)
** <code>southwest</code> (<code>sw</code>)
=== Benefits: ===
* '''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 (<code>top</code>, <code>bottom</code>, <code>left</code>, <code>right</code>) do not work well.
=== Possible Implementation: ===
* Modify the {{para|position}} handling in <code>Module:Location map</code> 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. [[User:Abhiramakella|Abhiramakella]] ([[User talk: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. [[User:LivinAWestLife|LivinAWestLife]] ([[User talk:LivinAWestLife|talk]]) 18:41, 8 August 2025 (UTC)
{{outdent}}
@[[User:LivinAWestLife|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 <code>top_offset</code>, available in <syntaxhighlight inline lang="wikitext">{{Location map/sandbox |top_offset=}}</syntaxhighlight>
{|
!current!!top_offset=0!!SW: top_ofset=โ1!!NW: top_offset=+1
|-
|{{Location map|Croatia Dalmatia|label=[[Vela Luka]]|lat=43|long=16.7|position=left|width=180|float=none|caption=}}
|{{Location map/sandbox|Croatia Dalmatia|label=[[Vela Luka]]|lat=43|long=16.7|position=left|width=180|float=none|caption=}}
|{{Location map/sandbox|Croatia Dalmatia|label=[[Vela Luka]]|lat=43|long=16.7|position=left|width=180|float=none|caption=|top_offset=-1}}
|{{Location map/sandbox|Croatia Dalmatia|label=[[Vela Luka]]|lat=43|long=16.7|position=left|width=180|float=none|caption=|marksize=13|label_size=110|top_offset=1}}
|-
!current!!top_offset=0!!NE: top_ofset=โ0.8!!SE: top_offset=+0.6
|-
|{{Location map|Croatia Dalmatia|label=[[Vela Luka]]|lat=43|long=16.7|position=right|width=180|float=none|caption=}}
|{{Location map/sandbox|Croatia Dalmatia|label=[[Vela Luka]]|lat=43|long=16.7|position=right|width=180|float=none|caption=}}
|{{Location map/sandbox|Croatia Dalmatia|label=[[Vela Luka]]|lat=43|long=16.7|position=right|width=180|float=none|caption=|top_offset=-0.8}}
|{{Location map/sandbox|Croatia Dalmatia|label=[[Vela Luka]]|lat=43|long=16.7|position=right|width=180|float=none|caption=|marksize=13|label_size=110|top_offset=0.6|label_width=4}}
|}
Let me know what you think! [[User:Ponor|Ponor]] ([[User talk: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. [[User:LivinAWestLife|LivinAWestLife]] ([[User talk:LivinAWestLife|talk]]) 19:37, 9 August 2025 (UTC)
== Automatic color mode bug ==
I'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! [[User:Quiddity|Quiddity]] ([[User talk:Quiddity|talk]]) 02:12, 25 April 2025 (UTC)
== Changing template name to "Template:Pushpin Location map" ==
Hi, 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, [[User:Hooman Mallahzadeh|Hooman Mallahzadeh]] ([[User talk:Hooman Mallahzadeh|talk]]) 03:02, 1 May 2025 (UTC)
:The pushpin (pog) is just the default marker. Templates like {{tl|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. โ [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 15:16, 1 May 2025 (UTC)
== Edit request 13 May 2025 ==
{{edit template-protected|Module:Location map/styles.css|answered=yes}}
'''Description of suggested change:'''
the whole map section, including the caption, gets affected by the grayscaling effect on lines [[module:___location map/styles.css#L-66|66]] and [[module:___location map/styles.css#L-79|79]] in [[module:___location map/styles.css|styles.css]], which causes some weird coloring (see [https://ibb.co/LXYjbtkm])
'''Diff:'''
{{TextDiff| html.skin-theme-clientpref-night .locmap {
filter: grayscale(0.6);
} | html.skin-theme-clientpref-night .locmap img {
filter: grayscale(0.6);
} }} [[User:ฦkrษm|<span style="padding: 4px 6px; background-color: black; color: white; font-weight: bold">ษkrษm<span style="color: #ABABAB">.</span></span>]] 18:06, 13 May 2025 (UTC)
:{{done}}<!-- Template:ETp --> [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 23:48, 23 May 2025 (UTC)
==Discussion at [[:Template talk:Wikidata ___location map#fallback default map vs. mapframe|Template talk:Wikidata ___location map ยง fallback default map vs. mapframe]]==
[[File:Symbol watching blue lashes high contrast.svg|25px|link=|alt=]] You are invited to join the discussion at [[:Template talk:Wikidata ___location map#fallback default map vs. mapframe|Template talk:Wikidata ___location map ยง fallback default map vs. mapframe]].  -- [[User:Joy|Joy]] ([[User talk:Joy|talk]]) 15:26, 16 August 2025 (UTC)<!-- [[Template:Please see]] -->
|