Module talk:Location map/Archive 8: Difference between revisions

Content deleted Content added
m Archiving 1 discussion(s) from Module talk:Location map) (bot
m Fixed Lint errors on this page (stripped tags)
 
(18 intermediate revisions by 4 users not shown)
Line 3:
== Detecting missing parameters, and illogical combinations ==
 
I want to incorporate the following code: <sourcesyntaxhighlight lang=text enclose=div>{{#switch:{{#if:{{{lat|}}}|1|0}}{{#if:{{{lon|}}}|1|0}}{{#if:{{{lat_deg|}}}|1|0}}{{#if:{{{lon_deg|}}}|1|0}}{{#if:{{{lat_min|}}}|1|0}}{{#if:{{{lon_min|}}}|1|0}}{{#if:{{{lat_sec|}}}|1|0}}{{#if:{{{lon_sec|}}}|1|0}}
|11000000|00110000|00111100|00111111=<!-- valid combinations - do none -->
|#default=[[Category:Location map parameter errors]]
}}{{#ifeq:{{#if:{{{lat_dir|}}}|1|0}}|{{#if:{{{lon_dir|}}}|1|0}}|<!-- valid combination - do none -->|[[Category:Location map parameter errors]]}}</sourcesyntaxhighlight> But I have no idea how to do it in Lua. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] ([[User talk:Redrose64|talk]]) 12:29, 4 February 2015 (UTC)
:{{ping|Redrose64}} I set this up, but with the generic error category instead of a new one, and also with visible messages explaining exactly what the problem is. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 18:45, 4 February 2015 (UTC)
::
Line 59:
It's my understanding that the {{param|name}} parameter of each map's own defining module or template is intended to be used within a default map caption and/or alt text when no explicit caption is supplied by the transcluding article. There's no requirement, as far as I can tell, that this parameter should be the name of an appropriate article. (That requirement would conflict, in some cases, with the previously mentioned intention; see below for an example) Yet when you view the module or template directly, the table that summarises the data wikilinks the name parameter. This can result in an unintended red link or to a link to a disambiguation page. Can the code that generates this table (wherever that is(?)) be modified not to link the name?
 
An example of this is [[:Module:Location map/data/United Kingdom Preston]]. In my view, the correct {{param|name}} for this is simply "Preston", but this generates an unwanted link to the disambiguation page [[Preston]]. I don't want to replace "Preston" by "Preston, Lancashire" because that would generate some unnecessarily verbose map captions; in the articles where this map appears, disambiguation isn't necessary as other information in the article makes it clear which "Preston" is being referred to. --<span style="border:1px solid #006000">[[User:Dr Greg|<fontspan style="color:#FFFF80;background:#006000">'''&nbsp;Dr&nbsp;Greg&nbsp;'''</fontspan>]][[User talk:Dr Greg|<fontspan style="color:#006000;background:#FFFF80">&nbsp;<small>talk</small>&nbsp;</fontspan>]]</span> 18:27, 2 July 2015 (UTC)
:{{ping|Dr Greg}} Should be fixed now. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 18:41, 2 July 2015 (UTC)
:: {{ping|Jackmcbarn|label1=Jack}} See [[Fernyhalgh Wood]]. [[User:Alakzi|Alakzi]] ([[User talk:Alakzi|talk]]) 19:02, 2 July 2015 (UTC)
Line 66:
:::{{ec}} Thanks, {{ping|Jackmcbarn}}, that seems to work for modules, but not for templates.
:::Unfortunately, I have now just discovered that [[:Template:Location map Scotland Highland]] has a piped name <code>Highland (council area)<nowiki>{{!}}</nowiki>Highland</code>, which is expecting to be linked. Which is the correct specification for what {{param|name}} is supposed to be?
:::I wrote the above sentences before Alakzi's reply. (Can we do something clever to detect the presence of a pipe character?) An example of a "misbehaving" infobox is {{tlx|Infobox UK feature}}. --<span style="border:1px solid #006000">[[User:Dr Greg|<fontspan style="color:#FFFF80;background:#006000">'''&nbsp;Dr&nbsp;Greg&nbsp;'''</fontspan>]][[User talk:Dr Greg|<fontspan style="color:#006000;background:#FFFF80">&nbsp;<small>talk</small>&nbsp;</fontspan>]]</span> 19:13, 2 July 2015 (UTC)
:::: Only [https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=Template%3A+intitle%3ALocation+map+intitle%3A-doc+insource%3A%2Fname.*%5C%7B%5C%7B%21%5C%7D%5C%7D%2F&fulltext=Search 16] of them in the Template namespace. [[User:Alakzi|Alakzi]] ([[User talk:Alakzi|talk]]) 19:27, 2 July 2015 (UTC)
:::: And [https://en.wikipedia.org/w/index.php?title=Special%3ASearch&profile=default&search=Template%3A+insource%3A%2F%5C%5B%5C%5B%5C%7B%5C%7B%5C%23invoke%5C%3ALocation+map%5C%7Cdata%2F&fulltext=Search these] are all of the infoboxes which link to the name. [[User:Alakzi|Alakzi]] ([[User talk:Alakzi|talk]]) 19:30, 2 July 2015 (UTC)
Line 113:
== [[Template talk:Infobox civil conflict]] ==
{{resolved}}
Anyone familiar with implementing ___location maps into infoboxes? I feel this infobox would be a great candidate. I tried to do it myself, but couldn't get it to show a map in previews. '''<font color="#00824A">[[User:Jolly Janner|Jolly]]</font>span <font colorstyle="color: #2A5FFF00824A;">Jolly</span>]] [[Special:Contributions/Jolly Janner|Ω]]</font>span <font colorstyle="color:#00824A2A5FFF">Ω</span>]] [[User talk:Jolly Janner|<span style="color:#00824A">Janner]]</fontspan>]]''' 23:05, 16 January 2016 (UTC)
:It appears that it does support it, but I just didn't know how to use it in an article. My mistake. '''<font color="#00824A">[[User:Jolly Janner|Jolly]]</font>span <font colorstyle="color: #2A5FFF00824A;">Jolly</span>]] [[Special:Contributions/Jolly Janner|Ω]]</font>span <font colorstyle="color:#00824A2A5FFF">Ω</span>]] [[User talk:Jolly Janner|<span style="color:#00824A">Janner]]</fontspan>]]''' 00:27, 17 January 2016 (UTC)
 
== Template-protected edit request on 25 March 2016 ==
Line 216:
::Good grief! All sorts of ideas have occurred to me but that wasn't one of them. [[User:Thincat|Thincat]] ([[User talk:Thincat|talk]]) 19:44, 22 May 2016 (UTC)
::I wonder, in my analysis above, whether when I said "leftward" I should have said "later defined". On the main map the points are defined clockwise starting at 4 o' clock. [[User:Thincat|Thincat]] ([[User talk:Thincat|talk]]) 19:54, 22 May 2016 (UTC)
 
== Migrating to <graph> maps ==
 
I just built {{tl|Graph:Map_with_marks}}, which has much more elaborate capabilities of graphing, based on the &lt;graph> tag. I think this template should be migrated because it should offer:
* each map becomes a regular image, without any printing issues (not a div with CSS positional hacks)
* this approach allows any number and any kind of base and overlay images/icons and labels, with any fonts/alignments/...
* it can be easily improved to be interactive, similar to [[mw:Template:Graph:Country_with_regions_and_capitals|Country_with_regions_and_capitals]] template.
CC: {{ping|Jackmcbarn}} {{ping|Izkala}}
--[[User:Yurik|Yurik]] ([[User talk:Yurik|talk]]) 21:36, 17 July 2016 (UTC)
 
== Relief maps ==
 
Would it be possible for this template to use relief maps, such as [[:File:Relief map of California.png]]? I think it would greatly enhance [[Climate of California]] and other climate pages, when they have maps of the locations whose temperature or precipitation is compared in a table, because it would show how climate is related to terrain. — [[User:Erutuon|Eru]]·[[User talk:Erutuon|tuon]] 20:11, 20 August 2016 (UTC)
: I have changed it to use the relief map at that article; it does not need any change to the module or template, it just needed a {{para|relief|1}} adding (the '1' can be anything as long as it‘s non empty).--<small>[[User:JohnBlackburne|JohnBlackburne]]</small><sup>[[User_talk:JohnBlackburne|words]]</sup><sub style="margin-left:-2.0ex;">[[Special:Contributions/JohnBlackburne|deeds]]</sub> 20:25, 20 August 2016 (UTC)
:: Thank you! It looks great. — [[User:Erutuon|Eru]]·[[User talk:Erutuon|tuon]] 20:31, 20 August 2016 (UTC)
 
== Template-protected edit request on 29 August 2016 ==
 
{{edit protected|ans=y}}
Could the content of the module sandbox be merged into the main template? This will allow a transclusion of {{tl|Coord}} to be input into the {{para|coordinates}} parameter (primarily to make it easier to use this template in infoboxes). See [[Help:Coordinates in infoboxes]] for more information on why this is necessary. —[[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]&nbsp;• [[Special:Contributions/Jc86035|contribs]]) <small>Use <span class="nowrap">&#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;</span> to reply to me</small> 14:39, 29 August 2016 (UTC)
:[[File:Yes check.svg|20px|link=|alt=]] '''Done'''<!-- Template:ETp --> [[User:Cabayi|Cabayi]] ([[User talk:Cabayi|talk]]) 15:15, 29 August 2016 (UTC)
::{{re|Cabayi}} Thanks! [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]&nbsp;• [[Special:Contributions/Jc86035|contribs]]) <small>Use <span class="nowrap">&#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;</span> to reply to me</small> 09:42, 30 August 2016 (UTC)
 
== Documentation for position parameter ==
The documentation says ''"The position of the label relative to the mark. Valid values are left, right, top and bottom. The default is right."'', but it appears that the default is actually ''left''. Am i seeing this correctly? Does this need to be fixed? --[[User:Bshirley|Bshirley]] ([[User talk:Bshirley|talk]]) 03:43, 17 September 2016 (UTC)
:The default actually doesn't work like any of the options. If you don't specify a position, it guesses whether it would fit better on the left or the right. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 03:47, 17 September 2016 (UTC)
:The more I used it, the more I wondered if that was the case. Thanks. --[[User:Bshirley|Bshirley]] ([[User talk:Bshirley|talk]]) 16:59, 17 September 2016 (UTC)
 
==USA instead of US==
Because the ___location map data uses the abbreviation USA, all the pages where there is a choice of maps take a parameter such as "Arkansa#USA" - this displays as radio buttons labelled
 
* Arkansas
* USA
* Both
 
MoS says to use US, not USA. We can fix this by either
 
* a) Moving the data and b) changing all the calls
* Fudging a special display of US when USA is received
* Both
 
Or some other better idea. {{Smiley}} Comments?
 
All&nbsp;the&nbsp;best: ''[[User:Rich Farmbrough|Rich]]&nbsp;[[User talk:Rich Farmbrough|Farmbrough]]'',<small> 19:24, 29 September 2016 (UTC).</small><br />
:{{ping|Rich Farmbrough}} Interesting. I'll try to rework how the switcherLabel parameter works to fix this. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 22:18, 29 September 2016 (UTC)
::Thanks! All&nbsp;the&nbsp;best: ''[[User:Rich Farmbrough|Rich]]&nbsp;[[User talk:Rich Farmbrough|Farmbrough]]'',<small> 22:28, 29 September 2016 (UTC).</small><br />
:::{{re|Rich Farmbrough|Jackmcbarn}} [[Special:Diff/742213785|Done]], I think. On another note, is there a reason why [[Module:Location map/data/USA|some]] data pages are named "Module:Location map/data/<var>place</var>" and [[Template:Location map USA California Southern|others]] are named "Template:Location map <var>place</var>"? [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span> 10:39, 2 October 2016 (UTC)
::::{{re|Jc86035}} It's historical. Once upon a time, all maps were defined via templates. Then a new, preferred, module definition was introduced, but the old templates were never converted to the new module format; the software is compatible with both versions. --<span style="border:1px solid #40A040">[[User:Dr Greg|<span style="color:#FFF8C0;background:#40A040">'''&nbsp;Dr&nbsp;Greg&nbsp;'''</span>]][[User talk:Dr Greg|<span style="color:#40A040;background:#FFF8C0">&nbsp;<small>talk</small>&nbsp;</span>]]</span> 11:58, 2 October 2016 (UTC)
:::::{{re|Dr Greg}} Couldn't we just make a bot request to copy data from all the various Template:Location map <var>place</var> pages to Module:Location map/data/<var>place</var>, instead of having two different systems which both have to be supported? [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span> 12:49, 2 October 2016 (UTC)
::::::Sounds like a good idea. All&nbsp;the&nbsp;best: ''[[User:Rich Farmbrough|Rich]]&nbsp;[[User talk:Rich Farmbrough|Farmbrough]]'',<small> 13:23, 2 October 2016 (UTC).</small><br />
:::::::{{ping|Jc86035|Rich Farmbrough}} Okay, that solution is a good alternative if we like the word "the". If you want to do the bot thing, a good place to start is [[Template:Location map/doc/Converting map definition templates to modules|the instructions for how to manually convert them]]. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 23:47, 2 October 2016 (UTC)
 
== Location map Ukraine Kiev Oblast ==
 
;Request:
: The map on [[Template:Location map Ukraine Kiev Oblast]] is coordinated incorrectly. As а reference point can be used [[Kotsiubynske]]. It's a small spot inside the Kiev city area. But in fact on this map, it's moved towards the top-right side.
 
I tried to correct it myself but I have no experience in such a job. I cannot even find ''Module:Location map/data/Ukraine Kiev Oblast'' Could you please help me? --[[User:TimeWaitsForNobody|TimeWaitsForNobody]] ([[User talk:TimeWaitsForNobody|talk]]) 20:35, 16 October 2016 (UTC)
: I had a look and the physical and non-physical maps did not match precisely, and checking the history of [[:File:Kyiv province ___location map.svg|the latter]] it had been updated with a slightly differently aligned version, so I reverted it. Have a look at it now to see if that fixes it; you may need to purge the page to see the change.--<small>[[User:JohnBlackburne|JohnBlackburne]]</small><sup>[[User_talk:JohnBlackburne|words]]</sup><sub style="margin-left:-2.0ex;">[[Special:Contributions/JohnBlackburne|deeds]]</sub> 21:07, 16 October 2016 (UTC)
:: Ta, but problem's still existed. As I mentioned the best way to check the map alignment is to see the position of [[Kotsiubynske]] village. It must be exactly on the spot inside the Kiev City area. You can see the small spot in the west part of the Kiev City area (in the centre). As a help you can see [https://www.google.com/maps/place/50%C2%B029'24.0%22N+30%C2%B020'05.0%22E/@50.4655299,30.5599417,10z/data=!4m5!3m4!1s0x0:0x0!8m2!3d50.49!4d30.334722?hl=en here] [[User:TimeWaitsForNobody|TimeWaitsForNobody]] ([[User talk:TimeWaitsForNobody|talk]]) 22:59, 16 October 2016 (UTC)
 
* I've made a test. I created [[User:TimeWaitsForNobody/sandbox#Kotsubynske]] using the [[Template:Location map]] and it works correctly but when the map is used inside the [[Template:Infobox settlement]], variable ''pushpin_map = Ukraine Kiev Oblast'', there's an error as you can see at [[Kotsiubynske]] article. [[User:TimeWaitsForNobody|TimeWaitsForNobody]] ([[User talk:TimeWaitsForNobody|talk]]) 00:35, 17 October 2016 (UTC)
 
* Thanks a lot, I don't know who's corrected it but '''now it's accurate'''. Unfortunately in other wiki languages, it's still been incorrect. e.g. [[:de:Kozjubynske]]. [[User:TimeWaitsForNobody|TimeWaitsForNobody]] ([[User talk:TimeWaitsForNobody|talk]]) 01:33, 17 October 2016 (UTC)
::The German version looks the same as the one on this Wikipedia to me. Changes like this can take time to propagate across articles, as they keep a local cache of the page to speed loading. You can force it to regenerate the page, to see a change to an image or template, by purging it. Append <code>?action=purge</code> to the page, e.g. [http://de.wikipedia.org/wiki/Kozjubynske?action=purge like this].--<small>[[User:JohnBlackburne|JohnBlackburne]]</small><sup>[[User_talk:JohnBlackburne|words]]</sup><sub style="margin-left:-2.0ex;">[[Special:Contributions/JohnBlackburne|deeds]]</sub> 08:52, 17 October 2016 (UTC)
 
== Ukraine map disappears on zoom in Firefox ==
 
{{Location map | Ukraine
| width = 250
| lat_deg = 50.45
| lon_deg = 30.523
| label = Kiev
}}
As reported at [[Template talk:Infobox settlement]], the ___location map of Ukraine disappears when zoom is not 100% in Firefox 47 and 49. For example, try to adjust your zoom and look at the map to the right. I cannot figure this out: can someone else help take a look? —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 13:20, 16 October 2016 (UTC)
:For what it's worth, I'm using Firefox 49.0.1 and see no problem at any zoom level.--<span style="border:1px solid #40A040">[[User:Dr Greg|<span style="color:#FFF8C0;background:#40A040">'''&nbsp;Dr&nbsp;Greg&nbsp;'''</span>]][[User talk:Dr Greg|<span style="color:#40A040;background:#FFF8C0">&nbsp;<small>talk</small>&nbsp;</span>]]</span> 14:12, 16 October 2016 (UTC)
::Works for me too. {{ping|Hike395}} Can you provide more info about your setup? [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 02:12, 17 October 2016 (UTC)
 
Actually I'm an initiator of this request. I'm using Firefox 47.0.1 The problem can be simulated next:
# View -> Zoom -> Reset
# View -> Zoom -> Zoom In
I've just tried it on another laptop with Firefox 49.0.1, the same problem.
[[User:TimeWaitsForNobody|TimeWaitsForNobody]] ([[User talk:TimeWaitsForNobody|talk]]) 03:15, 17 October 2016 (UTC)
{{clear|right}}
 
{{ping|TimeWaitsForNobody}} Firefox 49 on what? Windows, Linux, Mac? —[[user:EncMstr|EncMstr]] ([[user talk:EncMstr|talk]]) 03:35, 17 October 2016 (UTC)
* Firefox 49 -> Windows 10
* Firefox 47 -> Windows 8.1 - I usually use it.
[[User:TimeWaitsForNobody|TimeWaitsForNobody]] ([[User talk:TimeWaitsForNobody|talk]]) 03:44, 17 October 2016 (UTC)
 
:I'm Firefox 49.0 on Ubuntu. The map disappears at 110% and higher, but is ok for 100% and 90%. Very odd. Note: I have "Zoom Text Only" cleared (off). —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 05:06, 17 October 2016 (UTC)
:: I've tested the problem on a bunch of laptops, in fact it depends on the PC resolutions themselves. On some of them, the problem appears even for zoom 100%. [[User:TimeWaitsForNobody|TimeWaitsForNobody]] ([[User talk:TimeWaitsForNobody|talk]]) 06:47, 17 October 2016 (UTC)
:::What resolutions does the problem appear at? [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 20:42, 17 October 2016 (UTC)
:::: It varies. e.g. The normal resolution of my laptop is 1366 X 768. When I use a normal zoom the map is shown OK, but when I zoom in it disappears. [[User:TimeWaitsForNobody|TimeWaitsForNobody]] ([[User talk:TimeWaitsForNobody|talk]]) 22:08, 17 October 2016 (UTC)
:::::I'm on 49 on Ubuntu too, and I can't get this to happen still, even at 1366x768. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 22:32, 17 October 2016 (UTC)
::::::Is 1366x768 your native resolution? It is for my Ubuntu, and I see the behavior. I wonder if this is a Firefox bug? —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 00:04, 18 October 2016 (UTC)
{{Location map | Ukraine
| width = 256
| lat_deg = 50.45
| lon_deg = 30.523
| label = Kiev
}}
{{od|6}} I think this has something to do with the image width interacting poorly with scaling. Tweaking the width to 256 in this example makes the bug go away for me, see right. I can't guarantee that this will work for all browsers. —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 04:46, 18 October 2016 (UTC)
: Thanks, I don't have the problem any more too. [[User:TimeWaitsForNobody|TimeWaitsForNobody]] ([[User talk:TimeWaitsForNobody|talk]]) 09:02, 18 October 2016 (UTC)
 
== Accuracy ==
 
Is there a hard limit on the number of locations that can be displayed accurately using the Location+ template? It seems to start randomly off-setting the locations around when I reach 13-15 dots on one map. It doesn't break down completely but the error is enough to make it unusuable. Help? Thanks, [[User:Shannon1|<i style="font-family:Perpetua; color:#008080; font-size:medium">Shann</i>]][[User talk:Shannon1|<b style="color:#DC143C; font-size:medium; font-family:Perpetua">''o''</b>]][[Special:Contributions/Shannon1|<i style="font-family:Mistral; color:#4B6CFC; font-size:medium">n</i>]] 06:58, 2 November 2016 (UTC)
:{{ping|Shannon1}} The map code itself can handle huge numbers of points. For example, [[Template:Syrian Civil War detailed map]] has over 5000 points and still looks fine. If you're using {{tl|Location map+}} to use a lot of points, it's possible that you have some extra whitespace, which causes issues. What page do you notice inaccuracies on? [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 22:14, 2 November 2016 (UTC)
::{{ping|Jackmcbarn}} Thanks for the quick reply. I have a test page on [[User:Shannon1/Sandbox_3]], for locations of stream gauging stations in California. The ones in the top left are displaying correctly but the ones further down (RUS, AMR, ANF and SJF) are for some reason located quite a bit further south/west than they should. I checked the coordinates multiple times and can't seem to find the source of the problem. [[User:Shannon1|<i style="font-family:Perpetua; color:#008080; font-size:medium">Shann</i>]][[User talk:Shannon1|<b style="color:#DC143C; font-size:medium; font-family:Perpetua">''o''</b>]][[Special:Contributions/Shannon1|<i style="font-family:Mistral; color:#4B6CFC; font-size:medium">n</i>]] 23:53, 2 November 2016 (UTC)
:::{{ping|Shannon1}} The problem was indeed that you had extra whitespace. I removed it and now it looks normal to me. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 21:16, 4 November 2016 (UTC)
::::Oh wow, that looks much better. Thanks so much! I had no idea that the blank lines affected the display of coordinates. [[User:Shannon1|<i style="font-family:Perpetua; color:#008080; font-size:medium">Shann</i>]][[User talk:Shannon1|<b style="color:#DC143C; font-size:medium; font-family:Perpetua">''o''</b>]][[Special:Contributions/Shannon1|<i style="font-family:Mistral; color:#4B6CFC; font-size:medium">n</i>]] 21:25, 4 November 2016 (UTC)
 
== Template-protected edit request on 31 August 2016 ==
 
{{edit template-protected|answered=yes}}
Could the sandbox please be merged into the main template? This change makes the {{para|coordinates}} error message clearer and adds the precision tracking category for that parameter. Thanks, [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]&nbsp;• [[Special:Contributions/Jc86035|contribs]]) <small>Use <span class="nowrap">&#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;</span> to reply to me</small> 10:48, 31 August 2016 (UTC)
:{{re|Jc86035}} you made a request not 48 hours before this one. This module is somewhat heavily transcluded, used on almost half a million distinct pages. I'm wondering if the changes here are cumulative, or if you intend on making more changes in the very near future? It would be nice to make one edit if possible to something like this. (Just a quick question, cheers) If this is thought to be cumulative, the sandbox does look ready to sync. — [[User:Andy M. Wang|'''''Andy W.''''']] <span style="font-size:88%">('''[[User talk:Andy M. Wang|<span style="color:#164">talk</span>]] ·''' [[Special:Contribs/Andy M. Wang|ctb]])</span> 07:30, 1 September 2016 (UTC)
::{{re|Andy M. Wang}} This is probably my last edit request for now (unless someone breaks it by changing [[Module:Coordinates]], which isn't particularly likely). [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]&nbsp;• [[Special:Contributions/Jc86035|contribs]]) <small>Use <span class="nowrap">&#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;</span> to reply to me</small> 09:08, 1 September 2016 (UTC)
:[[File:Yes check.svg|20px|link=|alt=]] '''Done'''<!-- Template:ETp --> — [[User:Andy M. Wang|'''''Andy W.''''']] <span style="font-size:88%">('''[[User talk:Andy M. Wang|<span style="color:#164">talk</span>]] ·''' [[Special:Contribs/Andy M. Wang|ctb]])</span> 15:10, 1 September 2016 (UTC)
:{{ping|Jc86035|Andy M. Wang}} It's clear that this change was never tested, as the code path that adds the tracking category is [[Unreachable code|unreachable]]. To do what you wanted this to do, it would have to be done from [[Module:Coordinates]]. In the future, please don't request or make changes to this module without testing them. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 00:00, 21 September 2016 (UTC)
Rather than emit an error message ("{{red|Coordinates from [[Module:Coordinates]] and individual coordinates cannot both be provided}}"), it would be friendlier to editors and readers to simply use the value of {{para|coordinates}} when both {{para|latitude}}/{{para|longitude}} and {{para|coordinates}} are provided. The documentation could be updated accordingly. I do not know anything about programming Lua, so I wouldn't know where to start with the sandbox code.
 
The reason to fix it here instead of elsewhere is that the Location map template is used inside of many infoboxes, some of which have been coded with both types of parameters. It is easier to change this one ___location than to parse the call to Location map in each of these infoboxes. Thanks. – [[User:Jonesey95|Jonesey95]] ([[User talk:Jonesey95|talk]]) 05:02, 23 November 2016 (UTC)
:{{re|Jonesey95}} I've commented out the code which produces the error message for now. Once all the infoboxes have been converted we can reinstate the message. [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <small><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span></small> 06:53, 23 November 2016 (UTC)
 
== Help with Coordinates being off ==
 
I created a map in 2013 (and edited it in 2015) and took a screenshot of the results (see history of this image): [[:File:2015 Professional Soccer Teams in USA Canada.png]]
 
But now it produces something that is way off: [https://en.wikipedia.org/w/index.php?title=User:Tr%C3%B6del/soccer_map&oldid=678810967 see this edit] for what it looked like when I came back today before I started fiddling with the long/lat: https://en.wikipedia.org/w/index.php?title=User:Tr%C3%B6del/soccer_map&oldid=678810967
 
Does anyone know why the locations would have changed between then and now and what I can do to fix them? Thx in adv! --[[User talk:Trödel|<span style="color:#06C">Trödel</span>]] 04:10, 19 December 2016 (UTC)
 
: It looks fine to me. The dots aren’t aligned to the same spot but the coordinates aren’t the same so is presumably as intended. But it looks like your screenshot. How exactly is it 'way off'?--<small>[[User:JohnBlackburne|JohnBlackburne]]</small><sup>[[User_talk:JohnBlackburne|words]]</sup><sub style="margin-left:-2.0ex;">[[Special:Contributions/JohnBlackburne|deeds]]</sub> 06:23, 19 December 2016 (UTC)
:: Thanks for the reply. This image shows the downshift: [[:File:Soccer map showing coordinates are off.jpg]] All the coordinates are down by about 1 --[[User talk:Trödel|<span style="color:#06C">Trödel</span>]] 14:10, 19 December 2016 (UTC)
::: I see what you mean. Have a look at it now: I took the version that was having problems and stripped out a lot of white space and that seems to have fixed it. It probably was interpreting the spacing as paragraph breaks and so inserting <nowiki><p></nowiki> tags which was screwing with the layout. If you want spacing for layout you can put as many blank lines as you want inside comments.--<small>[[User:JohnBlackburne|JohnBlackburne]]</small><sup>[[User_talk:JohnBlackburne|words]]</sup><sub style="margin-left:-2.0ex;">[[Special:Contributions/JohnBlackburne|deeds]]</sub> 14:47, 19 December 2016 (UTC)
:Okay, this is a much more widespread problem than I thought. I added a fix to [[Module:Location map/multi]] that will hopefully make this not be a problem at all anymore. [[User:Jackmcbarn|Jackmcbarn]] ([[User talk:Jackmcbarn|talk]]) 17:28, 19 December 2016 (UTC)
::: Thank you both for your help! --[[User talk:Trödel|<span style="color:#06C">Trödel</span>]] 21:25, 28 December 2016 (UTC)
 
== Dynamic Kartographer maps ==
{{stack begin|clear=true}}{{Graph:Street map with marks | width=300 | height=300 | lat=51 | lon=10 | zoom=5 | minimap = false | { "lat": 52.516667, "lon": 13.383333 } }}{{stack end}}
Hi everyone,
 
I'm following the development of {{tl|Graph:Street map with marks}} by {{U|Yurik}} with great interest. How much has to be done to use those dynamic maps instead of pins on static PNGs/SVGs which are complicatedly generated based on data stored in subpages of this module? I would appreciate this improvement a lot since we would move towards up-to-date maps and a new promising tool. What do you think?
 
{{OSM Location map
|lat=51.593
|lon=-3.790
|zoom=12
|width=250
|height=300
|float=left
|caption = Port Talbot, South Wales
|mark-lat=51.565333
|mark-lon=-3.7602639
|shape=image
| label = Steelworks
| label-pos = left
|mark-title= Port Talbot Steelworks
|mark-image=Port Talbot Steelworks - geograph.org.uk - 41552.jpg
|mark-description=Tata Steel at Port Talbot
| label1 = Aberavon Beach
| label-pos1 = bottom
|mark-lat1=51.592802
|mark-lon1= -3.81779
| label2 = Port
| label-pos2 = left
|mark-lat2=51.58632
|mark-lon2= -3.78587
}}
-- [[User:T.seppelt|T.seppelt]] ([[User talk:T.seppelt|talk]]) 18:18, 16 October 2016 (UTC)
::{{U|T.seppelt}}, I came across {{U|Yurik}}'s template, and couldn't resist the possibilities. I have managed to put together a template that provides a more standard 'Location map'-style front end. It is called {{tl|OSM Location map}} and there are various examples in the documentation. It can have up to ten pins with labels, and map-centre and zoom level can be selected for anywhere in the world. It also provides a link through to a full-screen <nowiki><mapframe></nowiki>, with a more user-controllable pan and zoom option. [[User:RobinLeicester|RobinLeicester]] ([[User talk:RobinLeicester|talk]]) 17:11, 4 November 2016 (UTC)
:::{{ping|RobinLeicester}} This looks great. In the long run we should try to replace the current system. I would love to see a ___location in its country's boundaries. E.g. a template like yours but with a Wikidata-Country-ID parameter which lets the template load the country's shape from OSM and centers the map to the country's center. I was discussing this [[:mw:Topic:Teh3oqdu7ueu6yfe|here]]. -- [[User:T.seppelt|T.seppelt]] ([[User talk:T.seppelt|talk]]) 07:53, 5 November 2016 (UTC)
::::{{ping|T.seppelt|RobinLeicester}} Aren't [[:mw:Maps|interactive (inline) maps]] going to be enabled at some point anyway? [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <small><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span></small> 07:56, 5 November 2016 (UTC)
:::::{{ping|Jc86035}} Hopefully something more like the wikivoyage maps will make it onto wikipedia - but does anyone know a timescale on that? My thinking is that this one includes enough information that it could be rewritten to call something (even) better than {{tl|Graph:Street map with marks}} and any pages that now use it would be instantly upgraded.
::::::{{re|RobinLeicester}} It might be easier to just upgrade {{tl|Location map}} when it's possible (to make the default option the interactive map). This would work seamlessly for almost all objects (lines and areas on {{tl|Location map}} should be pretty rare) on Mercator maps. (Incidentally, {{tl|Coord}} will need to be upgraded soon as well, since maplink is already available and will soon have a lot of Geohack's features.) [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <small><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span></small> 11:44, 5 November 2016 (UTC)
::::::Not sure about the timescale (probably "when it's ''just about'' ready but not ''actually'' ready", per WMF standards) but it might have been enabled on three Wikipedias already. [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <small><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span></small> 11:47, 5 November 2016 (UTC)
:::::::That's great for all the Location map defined templates, (eventually) but the pages themselves depend on the template definitions. They don't have scale or dimension data, so can't just be converted. There are comparatively few large scale maps using Location map because making the templates by hand was such hard work, so mostly this is a new map possibility, to run alongside the region maps etc, rather than simply a replacement. <!-- Template:Unsigned --><small class="autosigned">—&nbsp;Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[User:RobinLeicester|RobinLeicester]] ([[User talk:RobinLeicester#top|talk]] • [[Special:Contributions/RobinLeicester|contribs]]) 12:43, 5 November 2016 (UTC)</small>
::::::::{{re|RobinLeicester}} Location maps ''do'' have dimension data, or are you referring to something other than their bounding box? For simple Mercator ___location maps, it ''should'' be possible (but is beyond my ability) to convert the lat/long bounding box of the ___location map into a good zoom level/display view for the interactive map. [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <small><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span></small> 13:51, 5 November 2016 (UTC)
::::::::::{{re|Jc86035}} I think we are saying the same thing here. The thousands of already defined {{tl|Location Map somewhere}} map modules/templates do have the bounding data, and someone sometime will be able to convert those to interactive maps. But anyone who now wants to include a map that doesn't have such a template already written - of a neighbourhood or landscape feature, for example - can now just define one within the article, which can then be automatically kept up to date, both by updates to OSM and as new possibilities for interactivity are rolled out. [[User:RobinLeicester|RobinLeicester]] ([[User talk:RobinLeicester|talk]]) 14:22, 5 November 2016 (UTC)
:::::::::::{{re|RobinLeicester}} We could, I guess, just add map coordinates and zoom level parameters to {{tl|Location map}}, and then merge {{tl|OSM Location map}} into the middle of [[Module:Location map]] until interactive maps are enabled. This might be better than having two different templates which have the same purpose. [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <small><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span></small> 14:35, 5 November 2016 (UTC)
::::::::::::{{re|Jc86035}} - meddling with {{tl|Location map}} and its various parts is way beyond my proficiency or permissions grade. As you implied above, I would think something as high profile as that will want to wait until a stable solution is in place. At the moment they are not doing the same thing as most Location maps don't use the OSM basemap, and might include boundaries, terrain and other features the OSM maps don't have. [[User:RobinLeicester|RobinLeicester]] ([[User talk:RobinLeicester|talk]]) 20:58, 5 November 2016 (UTC)
When these are fully ready for prime-time (they are getting closer, but aren't there yet), then they should be an option - possibly the default, possibly not - but the existing maps should continue to work. For ''static'' maps, the existing versions are generally better as they are lower on the [[chartjunk]] than a screenshot of a rich interactive map. I'd say OSM derived maps become most valuable at the large-scale, eg when showing a ___location within a city.--[[User:Nilfanion|Nilf]][[commons:User:Nilfanion|anion]] ([[User talk:Nilfanion|talk]]) 11:03, 7 November 2016 (UTC)
 
{{u|Nilfanion}}, {{u|T.seppelt}}, {{u|Jc86035}}, {{u|RobinLeicester}}: I have updated [[mw:Template:Graph:Street_map_with_marks|Street map with marks]] template to support datasets - this way the actual data for a specific map can be stored in one ___location, and used on many pages and many different wikis. But more importantly, the latest [[meta:2016_Community_Wishlist_Survey/Results|community wishlist results]] showed that one of the very high priority items is [[meta:2016_Community_Wishlist_Survey/Categories/Reading#CW2016-R021|Better interface and visualisation for coordinates and map]], which partially asks to convert geo coordinate into a maplink. Would any of you be interested in working on adapting the {{tl|coords}} template to it? What are the steps required? Where should we even have this discussion? Thanks! --[[User:Yurik|Yurik]] ([[User talk:Yurik|talk]]) 04:06, 6 January 2017 (UTC)
:{{re|Yurik}} I'm probably not experienced enough with Lua or any of the other aforementioned things to convert {{tl|coord}}, although I think it would be a good idea to ask editors on Wikivoyage (since they've done it already) if you haven't yet. [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <small><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span></small> 15:48, 6 January 2017 (UTC)
 
==[[Template:Location map many]]==
Why does the documentation for {{tl|Location map many}} claim that only 9 markers are supported? It functions fine with more. [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <small><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span></small> 14:33, 21 February 2017 (UTC)
:(edited documentation. [[User:Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) <small><span style="display:inline-block;margin-bottom:-0.3em;vertical-align:-0.4em;line-height:1.2em;font-size:80%;text-align:left">Use &#123;&#123;[[Template:Reply to|re]]&#124;Jc86035&#125;&#125;<br />to reply to me</span></small> 05:27, 26 February 2017 (UTC))
 
==Why is the default width multiplied by the map defaultscale?==
On line 161, the default width is being multiplied by the default scale:
:<code>if not args.width then width = round((args.default_width or 240) * (tonumber(map('defaultscale')) or 1))</code>
As far as I can tell, a map's defaultscale is its aspect ratio. So, multiplying the default width by its aspect ratio actually sets the default height. This seems it would be suprising to editors. (It certainly surprised me). Is this intentional? Am I misunderstanding what is going on? Thanks for any information. —[[User:Hike395|hike395]] ([[User talk:Hike395|talk]]) 06:55, 11 March 2017 (UTC)
: {{U|Hike395}}, You might find some useful information [[Module talk:Location map/Archive 6#Add default width to allow calling templates to specify width without overriding map-specific values|in the archives]]. Thanks! [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 22:04, 11 March 2017 (UTC)
: An example of a map with a defaultscale is [[Template:Location map Chile]]. I believe the idea is that an infobox can set a default_width for the maps, but for maps like Chile, this number is cut in half to avoid having a really tall ___location map. Note that if the user specifies a width, then that value is used without using the defaultwidth or multiplying by the defaultscale. So, the idea is that the 'default_width' parameter is only included the infobox code, and not exposed in the individual articles. Thanks! [[User:Plastikspork|Plastikspork]] [[User talk:Plastikspork|<sub style="font-size: 60%">―Œ</sub><sup style="margin-left:-3ex">(talk)</sup>]] 22:09, 11 March 2017 (UTC)