Module talk:Location map

From Wikipedia, the free encyclopedia
  (Redirected from Template talk:Location map)
Jump to: navigation, search

Template-protected edit request on 31 August 2016[edit]

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)

Dynamic Kartographer maps[edit]

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?


Port Talbot, South Wales

-- 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 (talkcontribs) 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)

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)

Help with Coordinates being off[edit]

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://en.wikipedia.org/w/index.php?title=User:Tr%C3%B6del/soccer_map&oldid=678810967

Does anyone know why the locations would have changed between then and now and what I can do to fix them? Thx in adv! --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)
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)