Module talk:Location map/Archive 8
This is an archive of past discussions about Module:Location map. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 5 | Archive 6 | Archive 7 | Archive 8 | Archive 9 | Archive 10 | Archive 11 |
Detecting missing parameters, and illogical combinations
I want to incorporate the following code:
{{#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]]}}
But I have no idea how to do it in Lua. --Redrose64 (talk) 12:29, 4 February 2015 (UTC)
- @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. Jackmcbarn (talk) 18:45, 4 February 2015 (UTC)
- Jackmcbarn, are you checking for 'lat_sec' without 'lon_sec', e.g.,
|lat_deg=39|lat_min=56|lat_sec=5|lat_dir=N|lon_deg=32|lon_min=52|lon_dir=E
that's the issue that prompted this thread. Frietjes (talk) 20:58, 4 February 2015 (UTC)- @Frietjes: No. How is that invalid? Jackmcbarn (talk) 21:00, 4 February 2015 (UTC)
- Jackmcbarn, see this thread. the bot did this, which would have been detected in a tracking category had we had a check for 'lat_sec' without 'lon_sec'. no need to issue an error, just a tracking category. Frietjes (talk) 21:03, 4 February 2015 (UTC)
- @Frietjes: I think a tracking category for that would be impractical, since lat_sec without lon_sec is valid in a lot of cases. Jackmcbarn (talk) 21:04, 4 February 2015 (UTC)
- Jackmcbarn, how about trying it, then seeing if there are a significant number of false positives in the category? I can tell you already that there will be at least 400 based on the list in User:Frietjes/d. seems a lot easier than having a bot scan every transclusion of this module to check. Frietjes (talk) 21:08, 4 February 2015 (UTC)
- @Frietjes: I think a tracking category for that would be impractical, since lat_sec without lon_sec is valid in a lot of cases. Jackmcbarn (talk) 21:04, 4 February 2015 (UTC)
- Jackmcbarn, see this thread. the bot did this, which would have been detected in a tracking category had we had a check for 'lat_sec' without 'lon_sec'. no need to issue an error, just a tracking category. Frietjes (talk) 21:03, 4 February 2015 (UTC)
- @Frietjes: No. How is that invalid? Jackmcbarn (talk) 21:00, 4 February 2015 (UTC)
- (edit conflict) It's not picking up Camnago-Lentate railway station, Carimate railway station, Carnate-Usmate railway station, Cassano d'Adda railway station, Ceriano Laghetto-Groane railway station, and plenty more. By my code above, all of these should yield 00111110, which is not one of my four valid combinations. If you consider latitude in isolation from longitude, this would technically be a valid combination, but that was not my intention. My intention was to take latitude and longitude together and ensure that if a parameter for one component of latitude was given, the same component for longitude was also given, and vice versa. In all those example, one parameter pair is imbalanced: there is a
|lat_sec=
(two of them in most cases) but there is no corresponding|lon_sec=
. I know that there are lots more like it, because I've turned up dozens in the last few days. They were caused by at least two sets of bad template documentation, which in some cases (estimated to be 1 in 60) was compounded by a good-faith but incorrect edit by SporkBot (talk · contribs), see User talk:Plastikspork#Wrong action for duplicate template args. What I am trying to do is find those pages which have two|lat_sec=
, and no|lon_sec=
- and fix them to have one of each. --Redrose64 (talk) 21:11, 4 February 2015 (UTC)- @Redrose64 and Frietjes: I just set up Category:Location maps with different longitude and latitude precisions containing the issue you're talking about. Note that the sortkey identifies which parameter is different (H for hemisphere, aka N/S/E/W). Jackmcbarn (talk) 02:20, 5 February 2015 (UTC)
- thanks, already used this correct a dozen of them, including unrelated problems like this. Frietjes (talk) 22:01, 5 February 2015 (UTC)
- I have now fixed all but three of the several hundred pages in Category:Location maps with different longitude and latitude precisions - it was useful for detecting typos like
|last=
for|lats=
. The three remaining pages are testcases where the precision is intentionally different. --Redrose64 (talk) 15:48, 27 February 2015 (UTC)
- I have now fixed all but three of the several hundred pages in Category:Location maps with different longitude and latitude precisions - it was useful for detecting typos like
- thanks, already used this correct a dozen of them, including unrelated problems like this. Frietjes (talk) 22:01, 5 February 2015 (UTC)
- @Redrose64 and Frietjes: I just set up Category:Location maps with different longitude and latitude precisions containing the issue you're talking about. Note that the sortkey identifies which parameter is different (H for hemisphere, aka N/S/E/W). Jackmcbarn (talk) 02:20, 5 February 2015 (UTC)
- Jackmcbarn, are you checking for 'lat_sec' without 'lon_sec', e.g.,
Switching in Module:Location map/multi
Is it possible to enable switching option in Module:Location map/multi? --Edgars2007 (talk/contribs) 16:14, 12 March 2015 (UTC)
- @Jackmcbarn: --Edgars2007 (talk/contribs) 18:21, 16 April 2015 (UTC)
- Switch between what? Alakzi (talk) 18:50, 16 April 2015 (UTC)
- @Edgars2007: Done Sorry for the delay. Jackmcbarn (talk) 19:41, 16 April 2015 (UTC)
- It's ok. Thanks --Edgars2007 (talk/contribs) 19:45, 16 April 2015 (UTC)
location limitation?
Is there a limitation in how many locations I can have in one map? It looks like I've reached the limit [1], if so how can I eventually remove the limit? No points are showing on the map in this edit, but the one before shows all points, [2]. --Ahmetyal (talk) 22:58, 18 April 2015 (UTC)
- @Ahmetyal: The module itself doesn't define any limit, but the MediaWiki parser effectively makes one. When you want to use as many points as you are, you're better off using a data module for the points, like Template:Syrian Civil War detailed map does. Jackmcbarn (talk) 04:08, 19 April 2015 (UTC)
- For the given example, if you remove the last three points, it then displays all of the others. --Redrose64 (talk) 07:44, 19 April 2015 (UTC)
- Thanks for the reply. @Jackmcbarn: is this the right wat to request a move: [3]? --Ahmetyal (talk) 09:29, 19 April 2015 (UTC)
Captions
@Jackmcbarn: If switcher is used and caption is defined, both of them are showing. I think that in such cases caption should be disabled. --Edgars2007 (talk/contribs) 15:59, 8 May 2015 (UTC)
- @Edgars2007: I don't see what the problem is. Can you clarify? Jackmcbarn (talk) 16:04, 8 May 2015 (UTC)
- Ok, this will be a better example: Fountains Abbey. IMO, the caption (Location of Fountains Abbey and Studley Royal Water Garden in North Yorkshire) should be disabled in module, when you're using multiple location maps. And the caption in this case is actually wrong, when you're viewing map of England :) --Edgars2007 (talk/contribs) 16:14, 8 May 2015 (UTC)
- The caption is generated independently in the infobox. These are two separate issues. Alakzi (talk) 16:30, 8 May 2015 (UTC)
- Indeed, it appears that there's nothing to fix in this module. If a caption doesn't make sense, it just shouldn't be specified. Jackmcbarn (talk) 16:41, 8 May 2015 (UTC)
- S*, yes, it isn't in the location map template :( OK, sorry then. Alakzi, I think there could be some more infoboxes, that should have this change. And this kind of style is used in much more, I think. --Edgars2007 (talk/contribs) 05:59, 9 May 2015 (UTC)
- Infobox thumbnail captions need revamping, least of all so that they are shown in Media Viewer. Shoving captions into hardcoded
<div>
s is hardly ideal. Alakzi (talk) 14:06, 9 May 2015 (UTC)
- Infobox thumbnail captions need revamping, least of all so that they are shown in Media Viewer. Shoving captions into hardcoded
- S*, yes, it isn't in the location map template :( OK, sorry then. Alakzi, I think there could be some more infoboxes, that should have this change. And this kind of style is used in much more, I think. --Edgars2007 (talk/contribs) 05:59, 9 May 2015 (UTC)
- Indeed, it appears that there's nothing to fix in this module. If a caption doesn't make sense, it just shouldn't be specified. Jackmcbarn (talk) 16:41, 8 May 2015 (UTC)
- The caption is generated independently in the infobox. These are two separate issues. Alakzi (talk) 16:30, 8 May 2015 (UTC)
- Ok, this will be a better example: Fountains Abbey. IMO, the caption (Location of Fountains Abbey and Studley Royal Water Garden in North Yorkshire) should be disabled in module, when you're using multiple location maps. And the caption in this case is actually wrong, when you're viewing map of England :) --Edgars2007 (talk/contribs) 16:14, 8 May 2015 (UTC)
"name" parameter
It's my understanding that the {{{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 {{{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. -- Dr Greg talk 18:27, 2 July 2015 (UTC)
- @Dr Greg: Should be fixed now. Jackmcbarn (talk) 18:41, 2 July 2015 (UTC)
- (edit conflict) Though the doc page links to it, {{Location map}} doesn't link to the name out of the box. At some point, somebody must've customised the caption in one of the very many infoboxes this template's used to wikilink to the name; consequently, to bypass a disambiguation page, an imaginative editor must've thought to pipe the name, as is done in Template:Location map Spain Basque Country. This workaround proliferated, and the rest, as they say, is history.
- Someone's gonna have to go through all of these map definitions to get rid of the pipes, as well as all of the infoboxes to unlink the name. Alakzi (talk) 18:54, 2 July 2015 (UTC)
- (edit conflict) Thanks, @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
Highland (council area){{!}}Highland
, which is expecting to be linked. Which is the correct specification for what{{{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
{{Infobox UK feature}}
. -- Dr Greg talk 19:13, 2 July 2015 (UTC)- Only 16 of them in the Template namespace. Alakzi (talk) 19:27, 2 July 2015 (UTC)
- And these are all of the infoboxes which link to the name. Alakzi (talk) 19:30, 2 July 2015 (UTC)
@Dr Greg and Alakzi: I added logic to the module to detect pipes in names. It will populate the "N" sortkey of Category:Location maps with possible errors. Note that it will take some time to fill due to the job queue. Jackmcbarn (talk) 22:06, 2 July 2015 (UTC)
- That was probably all of them; I don't think there's any in Module: definitions. Alakzi (talk) 22:48, 2 July 2015 (UTC)
points show as lines
I'm trying a fairly simple use of this template in my sandbox but all the points (using map-) show as vertical lines. It would seem that the vertical scale is not being set correctly. On that page are 4 examples: the 2nd two are copied from other pages and show the template working properly and in the first example with the same map. So can someone tell me what I'm doing wrong (in the first two)? Chris55 (talk) 20:06, 18 July 2015 (UTC)
- This happened to me once before. You need to use '~' not '-'. See Module talk:Location map/Archive 6#Can't get a map of County Durham to work. I've fixed in in your tests to confirm. This is really not obvious, especially as it looks like something else is happening such as a missing coord.--JohnBlackburnewordsdeeds 20:14, 18 July 2015 (UTC)
- Thanks John - couldn't see that!!! Thought it must be something simple. Where the heck do those lines come from?? Chris55 (talk) 20:54, 18 July 2015 (UTC)
- I see now I was misled by the documentation. There are 6 examples of "location map-" on that page and only one of "location map~". Chris55 (talk) 22:03, 18 July 2015 (UTC)
- What documentation is that? There shouldn't be any of those anywhere. Jackmcbarn (talk) 22:08, 18 July 2015 (UTC)
- Actually I see it is the abysmal font used on my browser (Firefox 39 Ubuntu) for the documentation on Template:Location map+. It is indeed a ~ but one could never tell. Looking at it on another platform I can see it. Chris55 (talk) 22:14, 18 July 2015 (UTC)
- In my case it’s Safari. In the edit window ~ and - are easy to mistake. The tilde looks almost flat, and on its own is not obviously longer. Plus it’s a rare character not often used in English or in programming languages. So if you look at the source for an example then manually retype it in yours you can get it wrong. Especially as it almost works, but looks like something else has gone wrong such as the x coord being missing. It does not surprise me Firefox also having problems as it has known issues displaying the proper fonts on many pages.--JohnBlackburnewordsdeeds 22:23, 18 July 2015 (UTC)
- I've RfD'd the problematic template, since it isn't currently being used for anything and it does cause this sort of confusion. Jackmcbarn (talk) 22:24, 18 July 2015 (UTC)
- In my case it’s Safari. In the edit window ~ and - are easy to mistake. The tilde looks almost flat, and on its own is not obviously longer. Plus it’s a rare character not often used in English or in programming languages. So if you look at the source for an example then manually retype it in yours you can get it wrong. Especially as it almost works, but looks like something else has gone wrong such as the x coord being missing. It does not surprise me Firefox also having problems as it has known issues displaying the proper fonts on many pages.--JohnBlackburnewordsdeeds 22:23, 18 July 2015 (UTC)
- Actually I see it is the abysmal font used on my browser (Firefox 39 Ubuntu) for the documentation on Template:Location map+. It is indeed a ~ but one could never tell. Looking at it on another platform I can see it. Chris55 (talk) 22:14, 18 July 2015 (UTC)
- What documentation is that? There shouldn't be any of those anywhere. Jackmcbarn (talk) 22:08, 18 July 2015 (UTC)
Delta Plan
Hello. I would like to create a map like for the Delta Plan which would be the translation of fr:Modèle:Carte/Plan Delta or nl:Sjabloon:Zijbalk Deltawerken, but I don't know how to start it. Can someone help me ? I guess I have to create Template:Location map Delta Plan, or Module:Location map/data/Delta Plan but there is always something wrong, the creation is always refused, it says "To preview another page with this template, a page title must be specified." I don't understand I wrote a title in it.--Io Herodotus (talk) 05:36, 7 September 2015 (UTC)
- Done Just one thing, on Module:Location map/data/Delta Plan, the map doesn't show. Perhaps it doesn't matter as long as Template:Delta Plan works. --Io Herodotus (talk) 20:52, 7 September 2015 (UTC)
- Someone kindly fixed it.--Io Herodotus (talk) 07:38, 8 September 2015 (UTC)
Disable links and enable tooltip
Hey. On this article, is there a way to disable the ability to click on the location map itself? In other words, the only link on the map is the pogs, not the map itself. Also on a separate note, is there a way to fix the tooltips that show when you hover on the pogs? For example, when you hover on any of the green or red pogs, the tooltip shows as List of dams and reservoirs in Sri Lanka
. I want that to change to the name of the link, or if that is not possible, a custom text instead of the current article name. Can anyone help? Thanks in advance! Rehman 12:22, 15 November 2015 (UTC)
- Rehman, try setting
|maplink=
but leave it blank. Frietjes (talk) 23:16, 17 November 2015 (UTC)- Thanks Frietjes, you're a genius! Any clue if the tooltip thing is possible? Rehman 13:34, 18 November 2015 (UTC)
- Rehman, two options,
|alt=
and|link=
. the alt parameter will override the entire alt text. the link parameter will override the first part of it. Frietjes (talk) 15:00, 18 November 2015 (UTC)- It doesn't work for some reason. Adding the alt text doesn't change the tooltip text when hovering over the pogs... Rehman 00:06, 19 November 2015 (UTC)
- Managed to find a solution. Thanks! Rehman 05:28, 21 November 2015 (UTC)
- Rehman, two options,
- Thanks Frietjes, you're a genius! Any clue if the tooltip thing is possible? Rehman 13:34, 18 November 2015 (UTC)
Mis-plotted coordinates?
Dear map experts:
I just updated a pair of geo coordinates in 3 separate places in the markup for the article T. A. Gillespie Company Shell Loading Plant explosion, and also in its Wikidata link d:Q7668106. I wasn't sure from the documentation: Are all 4 copies of the coordinates necessary to keep everything working consistently? Or is there a way to avoid having to maintain multiple copies?
According to Google/OpenStreet/Bing/etc, now the location is plotted correctly when I view the article and click on the numerical coordinates that display above or inside the infobox – but the template map below the infobox is plotting the location incorrectly (west of highway US 9, rather than east, and a bit too far north, leaving it about 2 miles off). Is it possible that the template map is mis-calibrated, or is something else going wrong? How can this be fixed? (In the article's wiki markup, I added a comment specifying a different template that shows the location correctly.) —Patrug (talk) 08:04, 3 January 2016 (UTC)
- @Patrug: The problem was that you specified the map name as New Jersey, but specified Location map of Middlesex County, New Jersey.svg as the AlternativeMap. You can only use AlternativeMap for different colorings of the exact same area, but in this case, the area was totally different. The fix was to use USA New Jersey Middlesex County as the map name, which uses the map you want as the default. Also, all of the templates can pull the coordinates from Wikidata, so I removed the parameters here. Jackmcbarn (talk) 19:49, 3 January 2016 (UTC)
- @Jackmcbarn: Ah, thanks for the explanation and the quick fix. (I'll alert the editor who added the mismatched maps a year ago, and I'll watch for other articles that might have similar problems.) Can the "coord" template itself pull coordinates from Wikidata? We should probably add some basic documentation about Wikidata coordinates to all the relevant template pages? —Patrug (talk) 07:02, 4 January 2016 (UTC)
- Module:Coordinates looks at Wikidata, but I can't get it to use it. When I have more time, I'll dig more into it. Yes, it would be a good idea to document how things interact with Wikidata. Jackmcbarn (talk) 04:02, 5 January 2016 (UTC)
- @Jackmcbarn: Ah, thanks for the explanation and the quick fix. (I'll alert the editor who added the mismatched maps a year ago, and I'll watch for other articles that might have similar problems.) Can the "coord" template itself pull coordinates from Wikidata? We should probably add some basic documentation about Wikidata coordinates to all the relevant template pages? —Patrug (talk) 07:02, 4 January 2016 (UTC)
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. Jolly Ω Janner 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. Jolly Ω Janner 00:27, 17 January 2016 (UTC)
Template-protected edit request on 25 March 2016
This edit request to Module:Location map has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Dear admins,
Due to the unsighting look of 'Red pog.svg' as the locator dot in the map, I would like to suggest the following change:
In line 395 of this module replace: mark = 'Red pog.svg' to mark = 'Locator_Dot.svg'
Please consider this request. Thank you very much for helping Wikipedia be a better place. LL221W (talk) 06:22, 25 March 2016 (UTC)
- As this is a style/content request more so than a technical request - will leave this open for a few days for community input. — xaosflux Talk 10:57, 25 March 2016 (UTC)
- Comment - Convenience links to File:Red pog.svg and File:Locator_Dot.svg, as well as Norman, Oklahoma, an example of the former in use. ―Mandruss ☎ 15:07, 25 March 2016 (UTC)
- Oppose - The marker is intended to have a three-dimensional appearance. This is reflected in the choice of
pushpin_
prefixes in the related parameters of {{infobox settlement}} and possibly other calling templates. Assuming the OP meant "unsightly", I don't see why they feel the current marker is unsightly. ―Mandruss ☎ 15:07, 25 March 2016 (UTC) - Oppose - Disagree with LL221W's aesthetic judgement, and I believe it's too trivial a change for a template with 471952 transclusions. Bazj (talk) 15:22, 25 March 2016 (UTC)
- I've disabled the edit request for now, since this is clearly controversial. Feel free to reopen it if you get a consensus to make the change. Jackmcbarn (talk) 16:29, 25 March 2016 (UTC)
- Oppose WP:IDONTLIKEIT not a good enough reason. --Tagishsimon (talk) 18:03, 25 March 2016 (UTC)
- Oppose per WP:BIKESHED —EncMstr (talk) 01:25, 26 March 2016 (UTC)
- Comment - For the record, despite being Opposed, I object on principle to both of the above two Oppose arguments. The proposer's argument may lack merit but it is not IDONTLIKEIT. They gave a reason—that the current marker is unsightly—and things like this should be changeable for solely aesthetic reasons if there is consensus to change.
BIKESHED is also misapplied here, as it implies that a change can be too minor to even consider, thereby imposing an arbitrary upper limit on quality. This would be bikeshed if a lot of editor time was being spent on it, which is not the case. Meanwhile, we spend dozens of editor-hours arguing about commas before Jr., with nary a soul asserting bikeshed. ―Mandruss ☎ 09:46, 26 March 2016 (UTC) - Comment - Take a look at the appearance of articles with 'Locator_Dot.svg' instead 'Red_pog.svg':
LL221W (talk) 09:51, 26 March 2016 (UTC)
- oppose; although I too find the current one unattractive, of the two it works much better due to its contrast. Even if it were better there is no need to change it though; there is nothing to stop editors using File:Locator Dot.svg or any other dot in their maps. If that were happening – if many editors were using other dots in preference to the current one in their maps – then there might be a case to change the default. But I see no indication of this, so no need to consider a change.--JohnBlackburnewordsdeeds 10:05, 26 March 2016 (UTC)
- Comment: LL221W- please don't go back and edit your comments once other users have commented. It makes a coherent discussion much harder to achieve.
- I also note this morning you've started a major effort to specify
mark = Locator_Dot.svg
in templates using this template, rendering this discussion meaningless. Could you make your contempt for the consensus any clearer? Bazj (talk) 07:37, 4 April 2016 (UTC)
- I also note this morning you've started a major effort to specify
- No, I was changing my own comments.--LL221W (talk) 07:39, 4 April 2016 (UTC)
Astronomical maps
Is it possible to modify the template (or create a similar one such as "Template:Location map astronomy/constellation or /star chart") that allows markers to be added to any constellation map? Celestial coordinates, instead of using longitude and latitude, use right ascension and declination.
Declination is essentially the same as latitude with astronomical objects being defined as between 0 and 90 degrees north or south of the celestial equator, the plane created by the earth's equator extended outward into the celestial orb. A star, galaxy, or nebula sharing the same declination as the earthbound observer's latitude will pass directly above the observer once a day. An observer at the north pole will always have the star Polaris overhead as the star has a declination of approximately 89 degrees north.
Right ascension differs from latitude in how is is measured. Lines of right ascension are defined not in degrees, minutes, and seconds, but rather in hours, minutes, and seconds. Hence, a difference of one hour in right ascension corresponds to fifteen degrees of arc and can be expressed as up to 12 hours east or west of the zero-hour datum--the celestial equivalent of the Greenwich meridian. That datum is defined at the vernal equinox, a point where the ecliptic crosses the celestial equator in the constellation Pisces and extending to the north and south celestial poles. This is the same point as the location of the sun when it crosses from the southern to the northern celestial hemispheres each spring on the earth's northern hemisphere.
An example where this would be useful is the star chart in the infobox of the article about the star Gliese 667. Currently, the display is hard-coded with the size of the chart and the circle depicting the star's position expressed in pixels. I'm not an expert in cartography, and I suspect that the astronomy wikiproject may need to rework the coding of their maps and the projections they use, but I'm sure the hard work would make editing articles much easier afterward.
Infoboxes of astronomy articles usually employ these templates to express the coordinates of a celestial object:
Thanks. Fortguy (talk) 03:32, 16 April 2016 (UTC)
- @Fortguy: It should be feasible to create something. Location maps are usually equirectangular projections (so latitude horizontal, and longitude vertical), but other projections can be used (see Template:Location map Russia). With regards to the star charts - what projection is used (or could be used), and what is the extent of the chart? If those facts are known, then it should be feasible to use location map coding. However, the calculations may fail entirely close to the poles.--Nilfanion (talk) 00:26, 10 May 2016 (UTC)
Relief maps
For reference:
MariaDB [enwiki_p]> select page_title from page where page_namespace = 828 and page_title like 'Location_map/data/%relief%'; Empty set (0.00 sec) MariaDB [enwiki_p]> select page_title from page where page_namespace = 10 and page_title like 'Location_map_%relief%'; +-------------------------------------+ | page_title | +-------------------------------------+ | Location_map+/relief | | Location_map_Central_Serbia_relief | | Location_map_Cuba_relief | | Location_map_Iberia_relief | | Location_map_Iberia_relief/doc | | Location_map_Slovakia_relief | | Location_map_Switzerland_relief | | Location_map_Switzerland_relief/doc | | Location_map_USA_relief | | Location_map_USA_relief/doc | | Location_map_United_States_relief | +-------------------------------------+ 11 rows in set (0.01 sec) MariaDB [enwiki_p]>
Jackmcbarn (talk) 16:40, 8 May 2016 (UTC)
Links being suppressed in location map
I have hit a snag using Template:Location map~ and I hope someone can help. I have set up a demonstration of the problem at User:Thincat/sandbox2. Both points have link= specified and their labels include links. As things stand clicking either the blob or the annotation for 120 links correctly. For 88 the label links OK but double clicking the blob merely leads to the 120 label becoming highlighted. I use Firefox but it seems the same with other browsers. If I keep the 88 label at "top", moving the 120 label anywhere other than right clears the fault with 88. Keeping the 120 label at "right" the fault occurs wherever the 88 label is but if it is at the left neither 88's blob nor label are clickable. This was going wrong before I made the labels include links. I think the problem is on the lines of if you have two blobs fairly near and side by side, the label on the leftward blob seems to have an extended scope to the right, extended way beyond the text. However, sometimes everything is OK even with much closer items. I have got a fairly good workround by using labels for links and positioning the label for one blob so it doesn't "hide" a nearby label but occasionally I haven't avoided "hiding" a blob. See The Outlying Fells of Lakeland#Map. Thincat (talk) 18:34, 22 May 2016 (UTC)
- strange, ... swapping the order of the labels in your sandbox fixed the links for me. Frietjes (talk) 19:18, 22 May 2016 (UTC)
- Good grief! All sorts of ideas have occurred to me but that wasn't one of them. 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. Thincat (talk) 19:54, 22 May 2016 (UTC)
Migrating to <graph> maps
I just built {{Graph:Map_with_marks}}, which has much more elaborate capabilities of graphing, based on the <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 Country_with_regions_and_capitals template.
CC: @Jackmcbarn: @Izkala: --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. — Eru·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
|relief=1
adding (the '1' can be anything as long as it‘s non empty).--JohnBlackburnewordsdeeds 20:25, 20 August 2016 (UTC)- Thank you! It looks great. — Eru·tuon 20:31, 20 August 2016 (UTC)
Template-protected edit request on 29 August 2016
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could the content of the module sandbox be merged into the main template? This will allow a transclusion of {{Coord}} to be input into the |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. —Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 14:39, 29 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? --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. Jackmcbarn (talk) 03:47, 17 September 2016 (UTC)
- The more I used it, the more I wondered if that was the case. Thanks. --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. Comments?
All the best: Rich Farmbrough, 19:24, 29 September 2016 (UTC).
- @Rich Farmbrough: Interesting. I'll try to rework how the switcherLabel parameter works to fix this. Jackmcbarn (talk) 22:18, 29 September 2016 (UTC)
- Thanks! All the best: Rich Farmbrough, 22:28, 29 September 2016 (UTC).
- @Rich Farmbrough and Jackmcbarn: Done, I think. On another note, is there a reason why some data pages are named "Module:Location map/data/place" and others are named "Template:Location map place"? Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 10:39, 2 October 2016 (UTC)- @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. -- Dr Greg talk 11:58, 2 October 2016 (UTC)
- @Dr Greg: Couldn't we just make a bot request to copy data from all the various Template:Location map place pages to Module:Location map/data/place, instead of having two different systems which both have to be supported? Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 12:49, 2 October 2016 (UTC)- Sounds like a good idea. All the best: Rich Farmbrough, 13:23, 2 October 2016 (UTC).
- @Jc86035 and 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 the instructions for how to manually convert them. Jackmcbarn (talk) 23:47, 2 October 2016 (UTC)
- Sounds like a good idea. All the best: Rich Farmbrough, 13:23, 2 October 2016 (UTC).
- @Dr Greg: Couldn't we just make a bot request to copy data from all the various Template:Location map place pages to Module:Location map/data/place, instead of having two different systems which both have to be supported? Jc86035 (talk) Use {{re|Jc86035}}
- @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. -- Dr Greg talk 11:58, 2 October 2016 (UTC)
- @Rich Farmbrough and Jackmcbarn: Done, I think. On another note, is there a reason why some data pages are named "Module:Location map/data/place" and others are named "Template:Location map place"? Jc86035 (talk) Use {{re|Jc86035}}
- Thanks! All the best: Rich Farmbrough, 22:28, 29 September 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? --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 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.--JohnBlackburnewordsdeeds 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 here 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. 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. 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
?action=purge
to the page, e.g. like this.--JohnBlackburnewordsdeeds 08:52, 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
Ukraine map disappears on zoom in Firefox
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? —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.-- Dr Greg talk 14:12, 16 October 2016 (UTC)
- Works for me too. @Hike395: Can you provide more info about your setup? 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. TimeWaitsForNobody (talk) 03:15, 17 October 2016 (UTC)
@TimeWaitsForNobody: Firefox 49 on what? Windows, Linux, Mac? —EncMstr (talk) 03:35, 17 October 2016 (UTC)
- Firefox 49 -> Windows 10
- Firefox 47 -> Windows 8.1 - I usually use it.
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). —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%. TimeWaitsForNobody (talk) 06:47, 17 October 2016 (UTC)
- What resolutions does the problem appear at? 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. 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. 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? —hike395 (talk) 00:04, 18 October 2016 (UTC)
- I'm on 49 on Ubuntu too, and I can't get this to happen still, even at 1366x768. Jackmcbarn (talk) 22:32, 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. TimeWaitsForNobody (talk) 22:08, 17 October 2016 (UTC)
- What resolutions does the problem appear at? Jackmcbarn (talk) 20:42, 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%. TimeWaitsForNobody (talk) 06:47, 17 October 2016 (UTC)
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. —hike395 (talk) 04:46, 18 October 2016 (UTC)
- Thanks, I don't have the problem any more too. 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, Shannon 06:58, 2 November 2016 (UTC)
- @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 {{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? Jackmcbarn (talk) 22:14, 2 November 2016 (UTC)
- @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. Shannon 23:53, 2 November 2016 (UTC)
- @Shannon1: The problem was indeed that you had extra whitespace. I removed it and now it looks normal to me. 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. Shannon 21:25, 4 November 2016 (UTC)
- @Shannon1: The problem was indeed that you had extra whitespace. I removed it and now it looks normal to me. Jackmcbarn (talk) 21:16, 4 November 2016 (UTC)
- @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. Shannon 23:53, 2 November 2016 (UTC)
Template-protected edit request on 31 August 2016
This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
Could the sandbox please be merged into the main template? This change makes the |coordinates=
error message clearer and adds the precision tracking category for that parameter. Thanks, Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 10:48, 31 August 2016 (UTC)
- @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. — Andy W. (talk · ctb) 07:30, 1 September 2016 (UTC)
- @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). Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 09:08, 1 September 2016 (UTC)
- Done — Andy W. (talk · ctb) 15:10, 1 September 2016 (UTC)
- @Jc86035 and Andy M. Wang: It's clear that this change was never tested, as the code path that adds the tracking category is 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. Jackmcbarn (talk) 00:00, 21 September 2016 (UTC)
Rather than emit an error message ("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 |coordinates=
when both |latitude=
/|longitude=
and |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. – Jonesey95 (talk) 05:02, 23 November 2016 (UTC)
- @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. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 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: see this edit for what it looked like when I came back today before I started fiddling with the long/lat: https://wiki.riteme.site/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! --Trödel 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'?--JohnBlackburnewordsdeeds 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 --Trödel 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 <p> 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.--JohnBlackburnewordsdeeds 14:47, 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 --Trödel 14:10, 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. Jackmcbarn (talk) 17:28, 19 December 2016 (UTC)
- Thank you both for your help! --Trödel 21:25, 28 December 2016 (UTC)
Dynamic Kartographer maps
Graphs are unavailable due to technical issues. There is more info on Phabricator and on MediaWiki.org. |
Hi everyone,
I'm following the development of {{Graph:Street map with marks}} by 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?
-- T.seppelt (talk) 18:18, 16 October 2016 (UTC)
- T.seppelt, I came across 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 {{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 <mapframe>, with a more user-controllable pan and zoom option. RobinLeicester (talk) 17:11, 4 November 2016 (UTC)
- @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 here. -- T.seppelt (talk) 07:53, 5 November 2016 (UTC)
- @T.seppelt and RobinLeicester: Aren't interactive (inline) maps going to be enabled at some point anyway? Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 07:56, 5 November 2016 (UTC)- @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 {{Graph:Street map with marks}} and any pages that now use it would be instantly upgraded.
- @RobinLeicester: It might be easier to just upgrade {{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 {{Location map}} should be pretty rare) on Mercator maps. (Incidentally, {{Coord}} will need to be upgraded soon as well, since maplink is already available and will soon have a lot of Geohack's features.) Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 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. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 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. — Preceding unsigned comment added by RobinLeicester (talk • contribs) 12:43, 5 November 2016 (UTC)
- @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. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 13:51, 5 November 2016 (UTC)- @Jc86035: I think we are saying the same thing here. The thousands of already defined {{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. RobinLeicester (talk) 14:22, 5 November 2016 (UTC)
- @RobinLeicester: We could, I guess, just add map coordinates and zoom level parameters to {{Location map}}, and then merge {{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. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 14:35, 5 November 2016 (UTC)- @Jc86035: - meddling with {{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. RobinLeicester (talk) 20:58, 5 November 2016 (UTC)
- @RobinLeicester: We could, I guess, just add map coordinates and zoom level parameters to {{Location map}}, and then merge {{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. Jc86035 (talk) Use {{re|Jc86035}}
- @Jc86035: I think we are saying the same thing here. The thousands of already defined {{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. RobinLeicester (talk) 14:22, 5 November 2016 (UTC)
- @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. Jc86035 (talk) Use {{re|Jc86035}}
- 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. — Preceding unsigned comment added by RobinLeicester (talk • contribs) 12:43, 5 November 2016 (UTC)
- @RobinLeicester: It might be easier to just upgrade {{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 {{Location map}} should be pretty rare) on Mercator maps. (Incidentally, {{Coord}} will need to be upgraded soon as well, since maplink is already available and will soon have a lot of Geohack's features.) Jc86035 (talk) Use {{re|Jc86035}}
- @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 {{Graph:Street map with marks}} and any pages that now use it would be instantly upgraded.
- @T.seppelt and RobinLeicester: Aren't interactive (inline) maps going to be enabled at some point anyway? Jc86035 (talk) Use {{re|Jc86035}}
- @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 here. -- T.seppelt (talk) 07:53, 5 November 2016 (UTC)
- T.seppelt, I came across 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 {{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 <mapframe>, with a more user-controllable pan and zoom option. RobinLeicester (talk) 17:11, 4 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.--Nilfanion (talk) 11:03, 7 November 2016 (UTC)
Nilfanion, T.seppelt, Jc86035, RobinLeicester: I have updated 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 community wishlist results showed that one of the very high priority items is 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 {{coords}} template to it? What are the steps required? Where should we even have this discussion? Thanks! --Yurik (talk) 04:06, 6 January 2017 (UTC)
- @Yurik: I'm probably not experienced enough with Lua or any of the other aforementioned things to convert {{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. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 15:48, 6 January 2017 (UTC)
Why does the documentation for {{Location map many}} claim that only 9 markers are supported? It functions fine with more. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 14:33, 21 February 2017 (UTC)
- (edited documentation. Jc86035 (talk) Use {{re|Jc86035}}
to reply to me 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:
if not args.width then width = round((args.default_width or 240) * (tonumber(map('defaultscale')) or 1))
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. —hike395 (talk) 06:55, 11 March 2017 (UTC)
- Hike395, You might find some useful information in the archives. Thanks! Plastikspork ―Œ(talk) 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! Plastikspork ―Œ(talk) 22:09, 11 March 2017 (UTC)