Module talk:Mapframe: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) to Module talk:Mapframe/Archive 2) (bot
m Archiving 1 discussion(s) to Module talk:Mapframe/Archive 2) (bot
 
(38 intermediate revisions by 15 users not shown)
Line 13:
}}
 
== Thumbnail rendering issue in [[José Salvador Alvarenga]] ==
== Copying template to another language wiki ==
 
Point 1 and most of the line not visible, something to do with the 180th meridian line. Same issue on the [[:fr:José_Salvador_Alvarenga|fr]] and [[:zh:荷西·薩爾瓦多·阿爾瓦倫加|zh]] pages. Also is there a way to make the 180 line not visible? [[User:Sohryu Asuka Langley Not Shikinami|Sohryu Asuka Langley Not Shikinami]] ([[User talk:Sohryu Asuka Langley Not Shikinami|talk]]) 05:28, 29 April 2025 (UTC)
Hi, I would like to request that this template, together with its dependencies be copied over to the Bulgarian wiki. There are a lot of pages that would benefit from it and there is currently no alternative template to use. The parameters can be left as is, but if needed I can translate them over.
 
:@[[User:Sohryu Asuka Langley Not Shikinami|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. [[User:Hooman Mallahzadeh|Hooman Mallahzadeh]] ([[User talk:Hooman Mallahzadeh|talk]]) 06:19, 29 April 2025 (UTC)
== Link to OSM relation ==
 
== How not dispay top right square for "Show in full screen" ==
Is it possible for {{tlx|mapframe}} to include a link to the OSM relation, please? Currently I use {{tlx|OSM relation}} separately. Thanks. [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 06:55, 21 September 2024 (UTC)
 
Hi, is there anyway to avoid showing top right while square ([ ]) for "Show in full screen"? Sometime this square disrupts the map. Thanks, [[User:Hooman Mallahzadeh|Hooman Mallahzadeh]] ([[User talk:Hooman Mallahzadeh|talk]]) 13:41, 5 May 2025 (UTC)
:Use the instructions on Kartographer in your earlier question, and change the type parameter for the shape on OSM to one of the four accepted, boundary is best. After some hours the Wiki maps server will copy the shape over and then you can call it using Mapframe and the Wikidata Q-number. Regs, [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 16:07, 21 September 2024 (UTC)
::I meant to ask in the more specific case of using a GEOJSON. The reason is I'm mapping an OSM relation of type "site", which is not currently supported by Wikimedia importer. [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 05:33, 23 September 2024 (UTC)
:::Such as {{tlx|mapframe|<nowiki>frame=yes|from=Muro_da_Mauá.map</nowiki>}} ?
:::{{mapframe|frame=yes|frame-align=left|from=Muro_da_Mauá.map}}
:::{{clear}}
:::Regs, [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 08:15, 23 September 2024 (UTC)
::::Yes, but the external link to OSM could point to the relation https://www.openstreetmap.org/relation/17981605#map=14/-30.02738/-51.22937&layers=N instead of just the center coordinates https://www.openstreetmap.org/#map=14/-30.02738/-51.22937 [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 23:56, 23 September 2024 (UTC)
:::::The Wikidata page is the central go-to point for all related features of an article. It already has a link to the relation on OSM, which usually gets cross-linked after adding the Q number to the relation on OSM. The Commons data page should also be added there. Regs, [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 09:47, 24 September 2024 (UTC)
::::::I've now linked the geoshape in Commons to [[:wikidata:Q9046732|Q9046732]]. But when I include the parameter "id=Q9046732", mapframe complains "The JSON content is not valid GeoJSON+simplestyle." But let's consider a simpler case: a Q-item whose OSM relation is well supported at Wikipedia, such as "maplink|frame=yes|type=line|id=Q1094308". Even in that case, there's no backlink to the relation at OSM, only to the center coordinates. [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 21:37, 24 September 2024 (UTC)
:::::::From External links, you can't get to the OSM relation. I think the relations are meant to be accessible but not easily, and doing so only from the Wikidata page or by performing a find for local features in OSM itself is a good compromise. But, you could request it as a new feature in Phabricator. Using the Q number will only work if <code>|type=</code> is one of the four supported, as the parameter is still 'site', the wall shape is therefore not available on Wiki's maps. The Commons map file is not fetched with the Q number, it's only linked. Regs, [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 01:08, 25 September 2024 (UTC)
 
:Don't think you can. Just increase the height of the frame to accommodate the map. Regs, [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 20:10, 7 May 2025 (UTC)
== Feature label ==
::@[[User:The Equalizer|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, [[User:Hooman Mallahzadeh|Hooman Mallahzadeh]] ([[User talk:Hooman Mallahzadeh|talk]]) 04:01, 8 May 2025 (UTC)
:::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. [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 18:34, 8 May 2025 (UTC)
::::@[[User:The Equalizer|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
<syntaxhighlight>
displaysquare = util.getParameterValue(args, "displaySquare") or L10n.defaults.displaySquare,
</syntaxhighlight>
::::and line 962 add
<syntaxhighlight>
if options.displaySquare == "no" then
local whiteSquare = assert(document:getElementsByClassName("mw-kartographer-fullScreen"))
whiteSquare:css("display", "none")
</syntaxhighlight> [[User:Hooman Mallahzadeh|Hooman Mallahzadeh]] ([[User talk:Hooman Mallahzadeh|talk]]) 04:03, 9 May 2025 (UTC)
 
: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. [[User:Hooman Mallahzadeh|Hooman Mallahzadeh]] ([[User talk:Hooman Mallahzadeh|talk]]) 14:27, 9 May 2025 (UTC)
The hovering label shown when clicking on the map is taken from the current page's title. It'd be nice to be able to set it manually, especially when invoking maplink multiple times in the same page. For example: {{maplink|frame=yes|type=line|id=Q1094308}}. Thanks! [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 21:46, 24 September 2024 (UTC)
 
== Failure to set frame-align=none ==
:Add <code>|title=</code>
:{{tlx|maplink|<nowiki>frame=yes|type=line|title=Budapest|id=Q1094308</nowiki>}}
:{{maplink|frame=yes|type=line|frame-align=left|title=Budapest|id=Q1094308}}
:{{clear}}
:Regs, [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 01:21, 25 September 2024 (UTC)
::Thank you! Not sure how I missed that information already in the documentation. [[User:Fgnievinski|fgnievinski]] ([[User talk:Fgnievinski|talk]]) 05:35, 25 September 2024 (UTC)
 
As the alignment of thumbnail images can be set to <code>none</code> (see [[Help:Pictures]]), its reasonable to let this module get support as well. Unfortunately, if I set {{para|frame-align|none}}, I see this notice: <nowiki><mapframe>: Attribute "align" has an invalid value</nowiki>. -- [[User:Great Brightstar|Great Brightstar]] ([[User talk:Great Brightstar|talk]]) 10:29, 20 May 2025 (UTC)
== Can't disable map in infobox ==
:This map does not allow thumbnail-sized images yet. See [[Module_talk:Mapframe/Archive_2#Can_this_map_be_scaled_to_match_readers'_thumbnail_size_preferences?|this archived discussion from 2023]], and a [[Template_talk:Infobox_mapframe#How_do_I_set_the_mapframe_width_to_the_reader's_thumb_size_preference?|similar archived discussion from March 2025]]. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 00:48, 22 May 2025 (UTC)
 
== Edit request 28 May 2025 ==
I would like to disable the map in the infobox but 'mapframe=no' does not work. The article is [[Leys Institute]]. It might just be a Wikidata thing. [[User:Traumnovelle|Traumnovelle]] ([[User talk:Traumnovelle|talk]]) 19:09, 30 September 2024 (UTC)
:Please do not ask the same question in multiple places, per [[WP:TALKFORK]]. I already explained in detail how to do this, but I understand that technical syntax is not everyone's cup of tea. I have disabled the map for you, even though I disagree with hiding the useful map in that article. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 18:10, 1 October 2024 (UTC)
 
{{Edit template-protected|answered=yes}}
== default caption (text=map) ==
 
'''Description of suggested change:'''
Hello, I propose to change the default text of the caption to be empty. In my opinion "map" doesn't really say anything meaningful. It is also a hurdle for other languages using the module.--[[User:McBayne|McBayne]] ([[User talk:McBayne|talk]]) 23:51, 25 October 2024 (UTC)
On line 94, change "paramter" to "parameter."
 
'''Diff:'''
== replication lag monitoring ==
{{TextDiff|1=valid values for type paramter|2=valid values for type parameter}} [[User:Shonebrooks|ShoneBrooks]] ([[User talk:Shonebrooks|talk]]) 15:00, 28 May 2025 (UTC)
:{{complete2}}. '''''[[User:Paine Ellsworth|<span style="font-size:92%;color:darkblue;font-family:Segoe Script">P.I.&nbsp;Ellsworth</span>]]'''''&thinsp;,&nbsp;[[Editor|<span style="color:black">ed.</span>]]&nbsp;[[User talk:Paine Ellsworth|<sup>put'er&nbsp;there</sup>]]&nbsp;<small>20:29, 28 May 2025 (UTC)</small>
 
== Display in title ==
Can someone remind me, where can we check if there's a general lag between data entry into OSM and data showing up in Wikimedia mapframes? FAQ A4 {{tq|It can take 1 or 2 days after tagging on OSM before the data is available here.}}
 
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. [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 20:30, 10 June 2025 (UTC)
I edited https://www.openstreetmap.org/relation/18351028 last night and in recent times it's been very quick, but now I'm not seeing the update and I'm starting to wonder.
 
:[[Special:Diff/1294960231|'''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? [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 21:21, 10 June 2025 (UTC)
IOW are the osm2pgsql run logs saved somewhere where they can be downloaded to see? --[[User:Joy|Joy]] ([[User talk:Joy|talk]]) 11:07, 30 November 2024 (UTC)
----
 
{{edit template-protected|answered=yes}}
:Checks for lag are here - nothing unusual now but for some spikes earlier: [[mw:Help:Extension:Kartographer/OSM#Synchronization between OSM and Wikimedia wikis]]
A naive search shows that there aren't that many articles that use {{tlx|mapframe|display{{=}}title}}, maybe no more than [https://en.wikipedia.org/w/index.php?title=Special:Search&limit=100&offset=0&ns0=1&search=hastemplate%3AMaplink+insource%3Adisplay+insource%3Atitle+insource%3A%2F%5BMm%5Daplink%5B%5E%7D%7B%5D%2Bdisplay+%2A%3D+%2A%5B%5E%7C%7D%5D%2Atitle%2F 50]. So I think it's safe to make [[Special:Diff/1294958307/1295035531|'''this change''']]. With it
:Nothing reported on Phabricator either. The links above do state anything up to 2 weeks is acceptable. I think it is nearly done as the relation is available, so wait another day I'd say. [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 09:11, 1 December 2024 (UTC)
* the module and template will do what they're supposed to do with {{para|display|title}}: the inline+title markers won't be shown next to each other in Vector-2022 (<span class="plainlinks">[https://en.wikipedia.org/wiki/Silver_Comet_Trail?useskin=vector-2022]</span>) nor the 'title' one will be placed on top of the infobox in Vector (<span class="plainlinks">[https://en.wikipedia.org/wiki/Silver_Comet_Trail?useskin=vector]</span>)
::Thanks for the links, there is no apparent lag, but it's still not rendering on [[Guanipa River]], maybe it's something else.
* the 'title' marker will be placed as the last of the [[:mw:Help:Page status indicators|indicators]] (the code added is mostly from that page)
::This code behavior where one says {{para|mapframe|yes}} and yet it still shows no error messages is rather frustrating, can we fix that somehow? --[[User:Joy|Joy]] ([[User talk:Joy|talk]]) 16:46, 2 December 2024 (UTC)
* the resulting html code seems clean, and in line with what {{tlx|coord}} already does
:::Fixed. Coordinates were missing off WD. Regs, [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 21:34, 2 December 2024 (UTC)
{| class="wikitable plainlinks center"
::::Aha, [https://www.wikidata.org/w/index.php?title=Q3646674&diff=prev&oldid=2282842583], thanks.
! !!Vector 2022 !!Vector !!Monobook !!Timeless
::::That apparent requirement doesn't quite make sense, either, since the interesting thing mapframe plots there is the line relation, not that point. --[[User:Joy|Joy]] ([[User talk:Joy|talk]]) 07:49, 3 December 2024 (UTC)
|-
:::And AFTER the lag, comes the caching. For some things this is 24 hours (shapes and OSM lookups), and other things (like raw tiles), this can be up to 30 days. —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 12:17, 3 December 2024 (UTC)
|[[TM:Maplink]]||[https://en.wikipedia.org/wiki/Template:Maplink?useskin=vector-2022] {{cross}} ||[https://en.wikipedia.org/wiki/Template:Maplink?useskin=vector] {{cross}} ||[https://en.wikipedia.org/wiki/Template:Maplink?useskin=monobook] {{tick}} ||[https://en.wikipedia.org/wiki/Template:Maplink?useskin=timeless] {{tick}}
|-
|[[TM:Maplink/sandbox]]||[https://en.wikipedia.org/wiki/Template:Maplink/sandbox?useskin=vector-2022] {{tick}} ||[https://en.wikipedia.org/wiki/Template:Maplink/sandbox?useskin=vector] {{tick}} ||[https://en.wikipedia.org/wiki/Template:Maplink/sandbox?useskin=monobook] {{tick}} ||[https://en.wikipedia.org/wiki/Template:Maplink/sandbox?useskin=timeless] {{tick}}
|}
Thanks, [[User:Ponor|Ponor]] ([[User talk:Ponor|talk]]) 13:50, 11 June 2025 (UTC)
:{{done}}<!-- Template:ETp --> Thanks, I had noticed this being broken a while ago and just did not want to deal with it at all. [[User:Izno|Izno]] ([[User talk:Izno|talk]]) 02:48, 28 June 2025 (UTC)
 
== 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? [[User:OceanLoop|OceanLoop]] ([[User talk:OceanLoop|talk]]) 00:55, 24 July 2025 (UTC)
 
:Fixed. Regs, [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 19:10, 24 July 2025 (UTC)
 
== How avoid text that appears when hover mouse cursor over the map? ==
 
{{maplink|frame=yes|type=line|id=Q2879655|text=Site of Cook's death in Kealakekua Bay |zoom=14|type3=point|coord3={{coord|19.48124|N|155.93325|W}}|title3=Point|description3=Site of death |frame-coordinates={{coord|19.48134|N|155.93025|W}}}}
 
In Talk page at [[Talk:Death_of_James_Cook#Comments_from_Noleander]] I put a map. I've replicated the map here. When the mouse cursor is hovered over the map (desktop computer; Windows OS, Firefox browser) a popup window appears containing the text "The intuitive WP:UE/WP:COMMONNAME page title for this would probably be Death of James Cook. Just saying." which is the text (unreleated to the map) at the top of that Talk page.
 
That text popup window does not appear here, in this Talk page, when hovering over the map.
 
Does anyone know why that text is appearing? and if there is a way to prevent that popup from appearing? [[User:Noleander|Noleander]] ([[User talk:Noleander|talk]]) 18:29, 10 August 2025 (UTC)
 
:Likely have the [[Wikipedia:Tools/Navigation popups]] gadget switched on in your preferences, as that line is the very first topic on the talk page. Regs, [[User:The Equalizer|The Equalizer]] ([[User talk:The Equalizer|talk]]) 19:21, 10 August 2025 (UTC)
::You are correct ... that fixed it. Thanks. [[User:Noleander|Noleander]] ([[User talk:Noleander|talk]]) 19:36, 10 August 2025 (UTC)
:::{{tl|maplink}} could probably set the 'nopopups' class to avoid that navigation popups triggers. —[[User:TheDJ|Th<span style="color: green">e</span>DJ]] ([[User talk:TheDJ|talk]] • [[Special:Contributions/TheDJ|contribs]]) 08:10, 11 August 2025 (UTC)
::::If there is a way to disable this popup issue, permanently, by a change to the maplink template, that would prevent this issue from arising in the future for other editors & readers ... so it seems like a good idea. [[User:Noleander|Noleander]] ([[User talk:Noleander|talk]]) 12:33, 11 August 2025 (UTC)