Module talk:Coordinates/Archive 2

TPE on 11 Sep 2016
Could the sandbox versions of this module and Coord be merged into the main versions of each? This change would move the parser function  into the module, allowing Wikidata to be used without generating errors, and would allow coordinates with latitude before longitude. Jc86035 (talk) Use &#123;&#123;re&#124;Jc86035&#125;&#125; to reply to me 16:23, 11 September 2016 (UTC) to reply to me 02:14, 12 September 2016 (UTC) to reply to me 13:27, 13 September 2016 (UTC)
 * Some questions before a potential sync, since this is is very heavily transcluded. 1. What has been the extent of your testing and validation that your change in the module (and removal in the template) works correctly? 2. Despite WP:PERF, Could it have been possible to request this change in August and do a more cumulative sync to avoid having to edit twice to avoid server strain when possible? — Andy W.  ( talk  · ctb) 17:18, 11 September 2016 (UTC)
 * Removing edit request; there are a few changes I'd like to make to the  function first. Jc86035 (talk) Use &#123;&#123;re&#124;Jc86035&#125;&#125;
 * Reactivated edit request; additional changes didn't work. Tested original conditions in Module talk:Coordinates/testcases (all test failures are due to the addition of the parser function and are expected) and Template:Coord/testcases. (TL;DR: Could the sandbox versions of this module and Coord be merged into the main versions of each?) Thanks, Jc86035 (talk) Use &#123;&#123;re&#124;Jc86035&#125;&#125;
 * Synced module and template. Ping/reopen if there are pending issues, cheers — Andy W.  ( talk  · ctb) 15:50, 13 September 2016 (UTC)
 * Undid, followed up on your talk — Andy W.  ( talk  · ctb) 16:10, 13 September 2016 (UTC)

Usage of Module:Coordinates in Module:HS listed building results in error
Hi! There seems to be an issue with the Module:Coordinates after I added picture and Commonscat for an item in the List of Category A listed buildings in Highland. I'm not quite sure if this is a mistake on my side, but even looking at old versions of the list I still get the same error message "Lua error in Module:Coordinates at line 657: Tried to read nil global frame.". Does anyone here know how to fix this? Would be much appreciated! Braveheart (talk) 14:44, 20 September 2016 (UTC) to reply to me 16:02, 20 September 2016 (UTC) to reply to me 11:09, 21 September 2016 (UTC) to reply to me 11:14, 21 September 2016 (UTC)
 * Backed out (for now, don't know if I have time to look into this) — Andy W.  ( talk  · ctb) 16:00, 20 September 2016 (UTC)
 * This could probably be solved (rather quickly) by modifying HS listed building to use Coord instead of this module + the #coordinates: parser function. Jc86035 (talk) Use &#123;&#123;re&#124;Jc86035&#125;&#125;
 * I set up a sandbox at for the HS listing building templates/modules that call the coordinates sandbox. Can test at Template:HS listed building row/testcases to make sure the nil global frame issue can be fixed by your suggestion. — Andy W.  ( talk  · ctb) 16:09, 20 September 2016 (UTC)
 * A list of modules that looks to be tangentially related or possibly be affected by the change. (very rough list, didn't go further into detail): Module:FindFeatures, Module:FindFeatures/displayDatabase, Module:Geobox coor, Module:HS listed building ( error reported ), Module:Location map, Module:WikidataCoord, Module:Parameters, Module:OSM, Module:WikidataIB, Module:Solar eclipse, Module:Wikidata2. Modules like Module:WikidataIB, Module:Geobox coor, and Module:Solar eclipse call expandTemplate on coord. I can't tell if any other module is using Coordinates like HS listed building is. A bit busy right now, but may find the time still to call the module directly rather than the template, which I believe is better practice — Andy W.  ( talk  · ctb) 17:51, 20 September 2016 (UTC)
 * I think HS listed building is likely the [//en.wikipedia.org/w/index.php?title=Special:Search&search=insource%3A%2Frequire%5C%28%27%5BMm%5Dodule%5C%3A%5BCc%5Doordinates%27%5C%29%2F&fulltext=Search&profile=all only module] which calls Module:Coordinates directly, so none of the others should be affected. In any case, their uses would show up in Category:Pages with script errors. My Lua skills do not extend very far beyond the Ustring library, regular expressions and concatenating HTML, so it's probably up to a more experienced coder to do this. Jc86035 (talk) Use &#123;&#123;re&#124;Jc86035&#125;&#125;
 * Never mind, I didn't notice that fixed it. Hopefully I haven't introduced any other weird errors in the module. Jc86035 (talk) Use &#123;&#123;re&#124;Jc86035&#125;&#125;
 * Synced again, didn't find any other compatibility issues — Andy W.  ( talk  · ctb) 04:59, 22 September 2016 (UTC)
 * I just updated Module:Geobox coor to use this module directly. please revert and let me know if there are any serious problems. Frietjes (talk) 14:36, 20 October 2016 (UTC)

Coordinates not on Wikidata
Why is YouTube categorized in this category when there are coordinates on Wikidata? --Obsuser (talk) 16:03, 17 May 2017 (UTC)
 * This happens because YouTube on Wikidata does not have a "coordinate location" (P625) property, I believe. – Jonesey95 (talk) 16:12, 17 May 2017 (UTC)

adding a place name through coordinsert
I have added an additional feature to  in Module:Coordinates/sandbox to allow for name to add a place name. with this addition,  is equivalent to. you can verify this through Special:ExpandTemplates. this feature is only activated when name is specified, so it should have zero impact on existing uses. if there are no objections or concerns, I plan to eventually update the live module. this will help migrate Template:Mountain index row to use fully use coord without having to duplicate the name information in the coordinates call. Frietjes (talk) 13:48, 7 June 2017 (UTC)
 * no objections after 4 weeks, so now added. Frietjes (talk) 14:16, 5 July 2017 (UTC)

Negative E and negative N coordinates
posted a note on my talk page: "I think there is a bug: with 45.5039°N, -73.5876°W : 45.5039°N, -73.5876°W. This creates a link with -73 East, which is incorrect of course. I also suspect it will call out to the parser function this way and I think that's why coordinates in this format are not in the location database..." as far as I can tell, the only place where it is incorrect is in the url. I made [//en.wikipedia.org/w/index.php?title=Module%3ACoordinates%2Fsandbox&type=revision&diff=816166551&oldid=811239847 this change] to the sandbox, which appears to fix the problem:. would there be a problem if I were to make the same change to the live template? is there something that I am missing? thank you. Frietjes (talk) 13:59, 19 December 2017 (UTC)
 * looks good to me. —Th e DJ (talk • contribs) 21:39, 19 December 2017 (UTC)

To summarise: Sigh... so the change Frietjes proposes seems to be the best we can get right now :( —Th e DJ (talk • contribs) 15:35, 27 December 2017 (UTC)
 * 45.5039°N, -73.5876°W is currently passed to geohack as
 * This is odd, as decimal notation usually doesn't specify N/S/W/E unless the values are positive
 * It also turns out that the parserfunction #coordinates from the GeoData extension doesn't support this format
 * Geohack however doesn't support passing:
 * Geohack in this case expects
 * wikiminiatlas doesn't seem to support

Convert to indicator
I've implemented  in this change for phab:T67648. I don't know Lua, so please review. —&thinsp;JJMC89&thinsp; (T·C) 21:13, 24 March 2018 (UTC)
 * We will have to prepare new CSS for all skins for this indicator. Not too much of a problem, though sizing is a bit like playing with fire here as it wasn't particularly consistent in the old template (depended on where in the document you added it, and often it was inside font-small markers in the infobox). I have prepped something for Vector.css and monobook.css. It's a little bit bigger this way in almost any instance. However it is more consistent with the font size of the tagline ("From Wikipedia, the free encyclopedia"). opinions. Note that the css has to account for the old styling rules, as due to parser caching both the old and the new will need to live side by side for a while.. (prefix the old with .mw-parser-output class ?) —Th e DJ (talk • contribs) 15:34, 26 March 2018 (UTC)

Sharing from Open Street Map
I have just been retrospectively trying to find some coords for en: and commons. I can find the building- there is a tab called share- and the side panel tells me that the centre point (my building) is/has geo:51.50161,-0.04668?z=17. Going back to the days of the manframe we were taught to make it simple for the user who is by definition simple- computer power is cheap. So how about letting me paste the text geo:51.50161,-0.04668?z=17 into the first field and let the server translate it into 51.50161°N, -0.04668°W. I assume the pseudo code for } would be on the lines of if != text| }| toreal with a cleanup for the position of the comma. The field would need to come from  too. This would also allow for the named fields to be added too.ClemRutter (talk) 01:22, 10 January 2018 (UTC)
 * The correct venue for this request is WT:Lua.--Snaevar (talk) 20:54, 2 July 2020 (UTC)

Update geohack link
Please update the geohack link like is shown in this diff (ignore the language=is, please). This is due to the change mentioned at https://wikitech.wikimedia.org/wiki/News/Toolforge.org. The link in question is broken currently and the aforementioned diff would fix it.--Snaevar (talk) 23:07, 7 July 2020 (UTC)
 * Yes check.svg Done – Jonesey95 (talk) 23:19, 7 July 2020 (UTC)

Duplication of coordinates
Template:Infobox bridge gets the coordinates of the bridge from wikidata but this information is displayed twice on the article. Once in the top-right corner and again inside the infobox (example). This seems a bit excessive - is there something wrong with how this template is coded? &mdash; Martin (MSGJ · talk) 09:48, 22 September 2020 (UTC)
 * That is normal for many coordinate displays. See the "display" section of the documentation for Coord. What you are seeing is the "inline,title" option, which is used in many articles where infoboxes display coordinates. I think many editors are used to looking at the top right of the article for coordinates as a consistent location. – Jonesey95 (talk) 14:58, 22 September 2020 (UTC)
 * I guess I haven't noticed it before. I think standardisation is important, and I also think it is excessive to display it twice. Have there been any discussions about this? Is it mentioned in the manual of style? &mdash; Martin (MSGJ · talk) 08:19, 23 September 2020 (UTC)
 * I don't know of any discussions or guidelines. I think it's just something that has always happened. There are some infobox templates that manage to suppress the coordinates, and the "Coordinates" header, in the infobox when "display=title" is used in the coord template. I'd have to dig around for one, though. – Jonesey95 (talk) 15:14, 23 September 2020 (UTC)
 * Many, many articles use "inline,title" and show the coordinates at top-right and in the infobox. It looks a bit odd in Jarrow Bridge because the infobox is minimal with coordinates at the top of the text, but it is standard. Check articles for major cities, e.g. Paris. Johnuniq (talk) 01:51, 24 September 2020 (UTC)

please can you advise at Template talk:Infobox bridge? Some articles already have coord and the infobox is duplicating the coordinates in the top-right corner, which is not good. &mdash; Martin (MSGJ · talk) 17:28, 24 September 2020 (UTC)

change needed
this change needs to be done --Ookrainer (talk) 17:51, 9 December 2020 (UTC)
 * Red information icon with gradient background.svg Not done: Lots of problems with this change. First of all, it makes convert_dms2dec ignore its direction parameter. If we don't want to use a direction parameter anymore, it should be removed, not just ignored. Also, your addition of " or 0" to the degrees case means that pages with malformed coordinates will end up claiming they're on Null Island rather than giving an error. As for the other changes, what specific problem are they solving? Jackmcbarn (talk) 21:43, 9 December 2020 (UTC)
 * Jackmcbarn, why does it make convert_dms2dec ignore its direction parameter? I am just purifing it by

direction = mw.ustring.gsub(direction, '^[ ]*(.-)[ ]*$', '%1'); an addition of " or 0" to the degrees is not always useful, here I can agree with you. --Ookrainer (talk) 21:58, 9 December 2020 (UTC)
 * You're right about the direction parameter, now that I look at it again. I misread what the gsub was operating on. But anyway, my other question still stands: how are these changes an improvement? Jackmcbarn (talk) 03:41, 10 December 2020 (UTC)

Updating Coord2text
The updates to Coord2text in Module:Coordinates/sandbox seem to work for the most part, however it's not rounding the dms conversion like it used to. See Template:Coord/testcases for examples. Also, instead of parsing the coordinates from the geohack URL, would it be possible to parse them from the spans instead (like was done in Module:Location map)? That should make it more future-proof. Kaldari (talk) 04:58, 8 December 2020 (UTC)
 * Due to the frequent changes to Module:Coordinates/sandbox, I moved our working test version to Module:Coordinates/sandbox2. The testcases at Template:Coord/testcases have also been updated. As you can see there, the dms converted results are not being rounded properly, but I imagine that would be easy to fix. Kaldari (talk) 00:18, 15 December 2020 (UTC)

Update the microformat
The good people on microformats.org are quite unhappy at the way geo is handled on Wikipedia, to the extent that I had no idea how to start a (globe) proposal with the "we need it on Wikipedia" justification. Some of the issues are:


 * 1) Outdated "geo" format. They prefer hGeo now, where the class names are a lot more consistent.
 * 2) Some data are nonsense, esp. when we do globe:

Now that WikiProject Microformats have switched to the h- classes for everything but geo, it makes sense to move geo to the newer h-geo spec too.

--Artoria2e5 🌉 06:32, 8 March 2021 (UTC)

Straw edit request
Special:PermanentLink/1010953805 is my current attempt at updating the format using only minor tweaks without breaking backward compat. This fixes problem 1, but not yet problem 2. A procedure to parse the extra colon-style params into a dict is needed to fix 2. --Artoria2e5 🌉 06:32, 8 March 2021 (UTC)
 * Red information icon with gradient background.svg Not done: This is not how edit requests are to be used. It seems like you might want to start an RfC? Elli (talk &#124; contribs) 21:36, 8 March 2021 (UTC)
 * I had in mind to look at this, thanks Elli for hitting the talk page for me. ;) Will look at some point in the next 24 hours. --Izno (talk) 00:46, 9 March 2021 (UTC)
 * Your update seems to have broken . See the module testcases. --Izno (talk) 18:28, 10 March 2021 (UTC)

Update wikidata call
Implement Special:Diff/1026423137. It serves the same functionality as now, but does that more efficiently. Currently the module is loading the whole item into memory, instead of loading only the necessary statement, this change fixes that. Currently there is an memory issue on COVID-19 pandemic in India because of this (try to preview the page without the Coord template under the "first cases" in the infobox.) Snævar (talk) 05:56, 2 June 2021 (UTC)
 * Yes check.svg Done Izno (talk) 19:28, 4 June 2021 (UTC)

Template-protected edit request on 7 August 2021 Suggestion
Hello! The title coordinates are overlapping with other content on new Vector or if users have certain gadgets enabled. I'd like to propose a change to address this - make title coordinates use indicators. The only change that would need to be done to enable that is:

I am a hrwiki admin, I just adapted this module to hrwiki. You can see the proposed change [//hr.wikipedia.org/w/index.php?diff=5975822&oldid=5974835 here], and visit e.g. hr:Zagreb to see it in action (right side, parallel with page title).

It has become very difficult to use enwiki on new Vector, and this change would go a long way towards remedying that. Thank you! Ivi104 (talk) 00:27, 7 August 2021 (UTC)


 * I think this is the way to go, and would even propose replacing the in-title coordinates (the numbers) with icons only, similar to other indicators: UTF has 🌐 and 🗺. Ask yourself what those numbers mean to a reader, and whether you could tell which of the two cities, 48°1′N 16°2′E ans 45°5′N 15°6′E is the capital of a southeastern EU country, and which one is in Central Europe.
 * The solution with indicators is also present at Polish Wikipedia, pl:Nowy Jork.
 * On en.wiki, when New Vector is used, the in-title coordinates currently overlap with X-Tools, redirect templates (see New York City), info boxes (see Croatia), etc. Ponor (talk) 00:51, 7 August 2021 (UTC)
 * Red information icon with gradient background.svg Not done for now: See, where this has been discussed in detail. and  and maybe others may want to comment on this proposed workaround.  – Jonesey95 (talk) 20:17, 7 August 2021 (UTC)
 * Yes, the discussion is at Template talk:Coord. Izno (talk) 17:17, 8 August 2021 (UTC)

Template-protected edit request on 12 August 2021
Changes:
 * Change line 469:
 * From:
 * To:

This is because the function is returned here and never reaches line 482 for the category. ネイ (talk) 13:48, 12 August 2021 (UTC) Minor fix ネイ (talk) 13:48, 12 August 2021 (UTC)
 * ✅ -- WOSlinker (talk) 18:15, 12 August 2021 (UTC)

#coordinates parser function
I'm getting the error 'Lua error: callParserFunction: function "#coordinates" was not found.' on my own install. I copied Template:Coord and Module:Coordinates from Wikipedia, along with all the associated templates. The parser function #coordinates is part of Module:Coordinates, correct? I'm not clear on why it can't find it. Redheadkelly (talk) 06:34, 20 August 2021 (UTC)
 * You need mw:Extension:GeoData -- WOSlinker (talk) 06:48, 20 August 2021 (UTC)
 * Or remove that part from Module:Coordinates of course. —Th e DJ (talk • contribs) 11:11, 20 August 2021 (UTC)
 * Yep, that did it. Thanks so much. I didn't see that mentioned anywhere in the documentation. Redheadkelly (talk) 16:36, 20 August 2021 (UTC)
 * Well, did you document it for the next person ? :) —Th e DJ (talk • contribs) 11:37, 21 August 2021 (UTC)

Addition of fallthrough coordinate to check for headquarters location on Wikidata
Noticed that University of Yangon exhibits the maintenance category of Category:Coordinates not on Wikidata, when it does have coordinates on Wikidata.

Searched for relevant discussions on Wikidata, and came across these https://www.wikidata.org/wiki/Wikidata:Project_chat/Archive/2021/03#coordinate_location_(P625)_to_headquarters_location_(P159)_switch and https://www.wikidata.org/wiki/Wikidata:Project_chat#DeltaBot's_coordinate_location_(P625)_to_headquarters_location_(P159)_move.

It appears as though DeltaBot made mangled changes to Wikidata which Wikidata does not wish to revert (such as bulk converting properties to, which have flooded the Category:Coordinates not on Wikidata page with erroneous spam). So, instead, the module check should be corrected on Wikipedia to reflect these changes. Therefore, I propose implementing here in the module a check for after.

The code area begins on line 494. Additional checks should be added for qid, "P159" with identical parallel logic to the "P625" checks.

I will happily whip this up, but I do not have template edit rights here. Let me know, thanks. Top5a (talk) 05:31, 9 April 2022 (UTC)


 * , I'll shortly be poking at Module:Coordinates/sandbox, but not likely in the same place. You may make any changes necessary there. When you are done, use template edit request indicating the changes are in the sandbox. I don't see anything particularly wrong with adjusting the module to account for this issue.
 * It might be wise still to emit a category for the case where HQ location is present but primary coordinates are not, but I'll leave that for your consideration. Izno (talk) 22:20, 26 June 2022 (UTC)

Incompatibility between coordinsert and the name= parameter
Background: Template talk:Infobox UK place. See of Hatfield Chase, the coords URI in the title is and this is valid. However, with, the coords URI in the title becomes which is not valid - the additional values for the  parameter have been appended to the query string instead of being inserted at the appropriate place. This occurs because this code in Module:Coordinates:  is processed earlier than the   line that is in Template:Infobox UK place. Is it possible to either (a) amend coordinsert so that the extra code is inserted (as per its name) rather than appended (as per what it actually does), producing this URI: or (b) alter line 109 and anything dependent upon that so that the URI seen by coordinsert has the previous value of  last rather than first, producing this URI: I am no Lua expert; I don't trust myself to write the proper patch. -- Red rose64 &#x1f339; (talk) 19:25, 8 June 2022 (UTC)
 * https://geohack.toolforge.org/geohack.php?pagename=Hatfield_Chase&params=53.528_N_0.893_W_region:GB_type:city
 * https://geohack.toolforge.org/geohack.php?pagename=Hatfield_Chase&params=53.528_N_0.893_W_&title=Tunnel+Pits_region:GB_type:city
 * https://geohack.toolforge.org/geohack.php?pagename=Hatfield_Chase&params=53.528_N_0.893_W_region:GB_type:city&title=Tunnel+Pits
 * https://geohack.toolforge.org/geohack.php?pagename=Hatfield_Chase&title=Tunnel+Pits&params=53.528_N_0.893_W_region:GB_type:city


 * Should the name come last always? Or are there other URI parts that can come after? Izno (talk) 22:26, 26 June 2022 (UTC)
 * Hmm, according to our documentation
 * Neither link is as expected if this is a true statement. Izno (talk) 22:43, 26 June 2022 (UTC)
 * And then the "do not use" instruction essentially contradicts that there is a default assumed. Izno (talk) 22:44, 26 June 2022 (UTC)
 * In a URI, a query string begins with a question mark and ends with a hash character, or at the end of the URI if there is no fragment. The query string is made up of zero or more parameters separated by ampersands. A parameter is a name/value pair separated by an equals sign; an empty value is valid. So in my final example above there are three query parameters:
 * and they may occur in any order. It is up to the server to interpret the value of each parameter, and the geohack server expects the value of a  parameter to be literal text, which is why for the second URI given above it's displaying "Tunnel+Pits_region:GB_type:city" - it doesn't know to do any different. -- Red rose64 &#x1f339; (talk) 22:47, 26 June 2022 (UTC)
 * they may occur in any order is sufficient. The name parameter seems to be functioning fine e.g. on Template:Prime meridian, so this may be something that cannot be fixed if it is not working on that page, but I will take a look. Izno (talk) 23:58, 26 June 2022 (UTC)
 * (b) is not possible (at least without a dramatic rearchitecting of how coordinsert does its work and wiki-wide scale change): Like templates, modules are expanded inside out, so  cannot be run before the content inside it is expanded.
 * Regarding (a), I think I can do this. However, that function also provides a totally separate parameter name to hold the name someone intends to add e.g. code similar to . Consider if providing a passthrough parameter in the infobox instead will fix this problem satisfactorily. Izno (talk) 06:44, 27 June 2022 (UTC)
 * What could be done instead of (b) might be to move the title query parameter to the left rather than have it come last. Izno (talk) 06:46, 27 June 2022 (UTC)
 * I thought that's what I said - the URI seen by coordinsert has the previous value of last rather than first, that is to say, coordinsert would see
 * https://geohack.toolforge.org/geohack.php?pagename=Hatfield_Chase&title=Tunnel+Pits&params=53.528_N_0.893_W
 * and amend that to become:
 * https://geohack.toolforge.org/geohack.php?pagename=Hatfield_Chase&title=Tunnel+Pits&params=53.528_N_0.893_W_region:GB_type:city
 * Was this not clear? -- Red rose64 &#x1f339; (talk) 20:28, 27 June 2022 (UTC)
 * It was not. Izno (talk) 21:28, 27 June 2022 (UTC)
 * and amend that to become:
 * https://geohack.toolforge.org/geohack.php?pagename=Hatfield_Chase&title=Tunnel+Pits&params=53.528_N_0.893_W_region:GB_type:city
 * Was this not clear? -- Red rose64 &#x1f339; (talk) 20:28, 27 June 2022 (UTC)
 * It was not. Izno (talk) 21:28, 27 June 2022 (UTC)

city is broken
The city(9,999) parameter seems to be broken now, currently rendering everything after the "(" inline; e.g., as "7,456)_dim:3875&title=Mount+Pleasant 32°01′42″S 115°50′56″E" instead of just "32°01′42″S 115°50′56″E"; see Mount Pleasant, Western Australia. Betterkeks (talk) 09:31, 3 July 2022 (UTC)


 * No it's not. Its because on that page returns multiplevalues for thecity parameter. —Th e DJ (talk • contribs) 09:39, 3 July 2022 (UTC)
 * 🤦‍♂️ Thank you! Sorry to waste your time. Betterkeks (talk) 18:21, 3 July 2022 (UTC)

Protected edit request on 14 September 2022
Please add functionality to Coordinates:coord to accept a format=dec4 parameter to round decimal degree coordinates to four decimal degrees. This will allow coordinates to be entered in more precise decimal formats (such as the seven decimal digits used by the United States Geological Survey), but to be displayed in a standard four decimal digit format comparable to the (somewhat outdated) dms format. Retaining the more precise coordinate inputs to Template;Coord will permit error checking with external data sources (such as USGS). Thank you very much, Buaidh  talk e-mail 03:46, 14 September 2022 (UTC)


 * @Buaidh please can you make requested changes to Module:Coordinates/sandbox and test? &mdash; Martin (MSGJ · talk) 10:05, 21 September 2022 (UTC)
 * ❌ needs to be sandboxed and tested first. — xaosflux  Talk 17:45, 25 September 2022 (UTC)

Allow custom error on empty coordinates
At the moment, when using, if the coordinates are not available in Wikidata, it explodes with this red error message:

Coordinates: Missing latitude Invalid arguments have been passed to the function

Instead, it could be nice to add an extra parameter to just silently ignore this error message. Something like.

This will be very useful on use cases like  since it allows easy embedding in templates and easy Wikidata integration.

Is it something that could be useful? --Valerio Bozzolan (talk) 15:54, 20 August 2022 (UTC)
 * Why would anyone use the template without including actual coordinates in it? (When one wants to draw on Wikidata for coords, one usually uses WikidataCoord, which produces the message "" if coordinates are not present in Wikidata.) Deor (talk) 22:24, 20 August 2022 (UTC)
 * I was interested in WikidataCoord but I think it has the same problem: it always generates a big red error when coordinates are missing (instead of being able to silently do nothing in that case, or just add a category), so at the moment it's not possible to add this template into an infobox, since it does not give backward-compatibility and will just spawn lot of errors in the encyclopedia. --Valerio Bozzolan (talk) 08:03, 21 August 2022 (UTC)
 * , maybe I misunderstand, but if you want to include coord directly in an infobox, you could test for the existence of the wikidata coordinates before attempting to display the template. See Infobox telescope for an example implementation. – Jonesey95 (talk) 11:05, 21 August 2022 (UTC)


 * If Wikidata doesn't have the coordinates for something and you can't manage to find them yourself, just refrain from adding any coordinate template to the article. The Anomebot2 will add a coord missing template to the article, and someone who patrols the relevant hidden categories (as I do) will eventually get around to adding them if they can be determined. Deor (talk) 14:12, 21 August 2022 (UTC)
 * OK. I think it could be very convenient to be able to have "universities without coordinates" in a category (instead of showing a fatal error). If this small feature is not acceptable here, no problem. I understand this point of view and another template can be made to do what I suggest. Valerio Bozzolan (talk) 19:37, 22 August 2022 (UTC)


 * The case for silent errors (only tracking categories) would be when coordinate is embedded in infoboxes. Those infoboxes can be spread to large amounts of articles and finding which articles have/don't have coordinates is useful without it being shown to the user as error if there yet isn't coordinate. Ipr1 (talk) 11:29, 2 February 2023 (UTC)
 * More concrete example might be infobox for a famous work of art, which can be indoors or outdoors, for which coordinate may be missing yet and might be added later and so on. Embedded coordinates to infoboxes would need to handle gracefully the situations where it might never have a coordinate or it might be moved (as many statues have been moved in the past). So silent tracking would be preferred in these cases. Ipr1 (talk) 12:22, 2 February 2023 (UTC)

The Template:Coord template intersects articles' infoboxes/main text on Vector 2022 (default skin)
It appears as though the position of the template, when used under the  parameter, is absolute and cares little about neighboring infoboxes, images, or suspected article text. This issue has far reaching implications, as seen in articles such as Andaman_Islands, Operation Rheinübung, Aegadian Islands, Arabian Sea, or even the United States articles, particularly when page width is at its slim default. The issue is mitigated when other minimal templates such as Template:Main are used, but this may be more rare than common. I request administrator help as the Module in question is Fully Protected, in addition to my inability to suggest a concrete improvement/ to solve this objective issue. I already have slight troubles editing Templates, but a Module is out of my expertise. I suspect it has to do with adding margin/changing the CSS display type somewhere but I'll leave the details to whomever picks this up. Zaptor Zap  02:14, 28 April 2023 (UTC)


 * Please see #Coordinsert feature broken up above, which already discusses this problem. —Th e DJ (talk • contribs) 08:46, 28 April 2023 (UTC)
 * Oh, my bad. Sorry for the inapproproiate use of that template. Zaptor Zap   10:16, 28 April 2023 (UTC)

I've noticed this a lot in the last two days. Coincidence, or has something changed lately? Any solution that avoids the overlapping would be an improvement. the list of steps to fix indicators seems reasonable, are these waiting on new people to jump in or is there pushback elsewhere? – SJ + 14:03, 29 April 2023 (UTC)


 * No coincidence. The sitesub header (with From wikipedia the free encyclopedia) has accidentally disappeared in last weeks' release, further aggravating this problem. —Th e DJ (talk • contribs) 14:27, 29 April 2023 (UTC)
 * I see, didn't notice that at first. Thanks to Izno for the hackaround. We can pray for better release testing + reversion for regressions... but this seems another mark in favor of the indicator switch. – SJ +  14:40, 29 April 2023 (UTC), 02:47, 30 April 2023 (UTC)

Updating this module to use Kartographer
Please see Village pump (proposals). Galobtter (talk) 06:24, 10 May 2023 (UTC)

Lua errors
Recent edits to this module seem to have caused Lua errors to appear at a bunch of articles, such as Ferry Point International Bridge and Calvert Marine Museum * Pppery * it has begun... 14:55, 21 May 2023 (UTC)
 * I think it's due to switching to use the indicator tag. If coord is just using "display=title" then Module:Mapframe isn't seeing the the geohack url to parse. You can get the same error if you just used "coordinates=x" in the infobox. The article can be fixed by changing the coord params to "display=inline,title" but the Module:Mapframe should be improved to fail more gracefully when it can't find a coord value. -- WOSlinker (talk) 15:22, 21 May 2023 (UTC)
 * Error handling aside, shouldn't that use case be supported? Presumably the same fix that worked for coordinsert above (which I don't fully understand) should work for this case too. * Pppery * it has begun... 18:23, 21 May 2023 (UTC)
 * There does seem to be a row in the infobox though with just Coordinates as a title and a blank area to the right of that if just the display=title option is used. So another option is to move the coords outside of the infobox if just the title option is desired. -- WOSlinker (talk) 18:43, 21 May 2023 (UTC)
 * in case you are interested in this. * Pppery * it has begun... 18:24, 21 May 2023 (UTC)
 * @Pppery The error is caused by the call to  at Module:Mapframe, but I'm not sure why it's there in the first place. @Evad37 Do you know if it would be safe to remove the call to  ? –  Brandon XLF  (talk) 10:00, 22 May 2023 (UTC)

This problem appears to occur in general when the rare title is used rather than the much more common inline,title. I set German Museum of Technology, which uses Infobox museum, to use title, and it displays the error in preview. – Jonesey95 (talk) 14:21, 23 May 2023 (UTC)

LDS temples
I wrote the following before noticing this section, I guess this is the same issue? A recent edit has led to "Lua error in Module:Mapframe at line 384: attempt to perform arithmetic on local 'lat_d' (a nil value)" in many articles (list), for example Helsinki Finland Temple which uses LDS Temple/Helsinki Finland Temple as in: I guess the problem is that Infobox LDS Temple includes. The article is somehow pulling the coordinates from. I'm dropping this here as a start for others to continue an investigation. Johnuniq (talk) 08:02, 22 May 2023 (UTC)
 * Are you sure that the article is pulling "60°13'30"N, 24°46'54"E" from Wikidata and then displaying "Coordinates: 60°13′30.69479″N 24°46′54.42599″E", the value from LDS Temple/Helsinki Finland Temple? That seems like it is not happening. Regardless, removing title from LDS Temple/Helsinki Finland Temple makes the Lua error go away, but then the coordinates do not appear at the top of Helsinki Finland Temple. – Jonesey95 (talk) 14:08, 23 May 2023 (UTC)
 * Yes, you are right. I didn't look hard enough. Pretty weird situation but it's not really satisfactory to leave 150 articles with a big red error due to the recent change to this module. Johnuniq (talk) 03:16, 24 May 2023 (UTC)
 * I've fixed those. I made sure all the "Template:LDS Temple/" subpages has type:landmark in their coords params, then removed coordinsert from Template:Infobox LDS Temple and then updated those that just had display=title to also have inline. -- WOSlinker (talk) 06:38, 24 May 2023 (UTC)
 * Thanks. I don't know how coordinsert works but you have probably seen my comment at 05:06, 24 May 2023 below where I mention that it receives an indicator strip marker rather than coordinates. I guess that some of its usages involve coordinates being directly passed to the function, while attempts to pass what Module:Coordinates produces will now fail. Johnuniq (talk) 07:18, 24 May 2023 (UTC)