Template talk:Location

Info non-talk.svg Template:Location has been protected indefinitely because it is a highly-used or visible template. Use {{Edit request}} on this page to request an edit.
Please test any changes in the template's /sandbox or /testcases subpages, or in a user subpage, and consider discussing changes at the talk page before implementing them.

This Template is intended to complement Template:Information.

Example for useEdit

See: Image:Hildesheim-Hoher.Weg.Huckup.01.JPG

Syntax {{Location|Degree|Minute|Second|Latitude|Degree|Minute|Second|Longitude|Information attributes}}
Example {{Location|52|09|03.70|N|9|57|02.79|E|type:landmark_region:DE-NI_scale:5000}}

ExplanationEdit

The example is for a landmark in the region Germany (DE), Lower Saxony (Niedersachsen NI). By scale you request the mapping program to render the map in a scale of 1/5000.) Information attributes on landmark and region should always be added. Scale is an optional parameter and is not necessarily required. To find adequate parameters for other regions of the Earth, please look at the project pages in the English Wikipedia (w:en:Wikipedia:WikiProject Geographical coordinates or in the German Wikipedia (w:de:Wikipedia:WikiProjekt Georeferenzierung).

Include OSM map (2)Edit

User:Thgoiter, User:Yurik and others, I started to work on including OSM link, based on mw:Extension:Kartographer, to the template. For example:

Camera location 34° 05′ 32.36″ N, 116° 09′ 24.55″ W      View all coordinates using: OpenStreetMap - Google Earth  

adds   icon, using code: <maplink text="[[File:Openstreetmap logo.svg|20px|link=]]" zoom="13" latitude="34.092322" longitude="-116.156819">{ "type": "Feature", "geometry": { "type":"Point", "coordinates":[-116.156819, 34.092322] }, "properties": { "marker-symbol":"camera", "marker-size": "large", "marker-color": "0050d0" }}</maplink>, according to Special:ExpandTemplates. The link works just fine by itself, however inside the template it does not work at all. I will be gone for about a week, and it is unclear if I will have internet connection. Anybody wants to look at this for me? Pleas feel free to modify Module:Coordinates/sandbox as needed. --Jarekt (talk) 03:41, 13 October 2016 (UTC)

Link works for me, map is opening fullscreen. --тнояsтеn 10:53, 13 October 2016 (UTC)
Looks good! Jarekt, is there a reason you want to keep both links to geohack and to the new map in place? Is there anything specific missing from the <maplink> that we need to add to offer a good replacement? --Yurik (WMF) (talk) 21:53, 13 October 2016 (UTC)
Please do not delete the link to gehack! There are tons of services for specific purposes. --тнояsтеn 06:02, 17 October 2016 (UTC)
Yurik (WMF) about geohack vs. "new map". I do not have a strong opinion about it one way or the other. I am more in the function of a technical parson trying to follow the consensus. Removing geohack would be a "major" change and it would need to be discussed more widely and get more of a community consensus before implementing, since it would change the way template worked for a decade or so. I personally would vote for it as I think it is closer to what a new users would expect when clicking on coordinates link. If some users like тнояsтеn like additional functionality of geohack, we could link to it in some other way. I would propose to make the link available first so more people are exposed to it, before we propose to switch. We also would need to pay attention as not to break any bots that harvest info from this template. Yurik, one think specifically missing from the new map is what is provided by the other link to Wikimedia generated OSM map: location of all the other nearby images. Adding that would allow us to simplify the template by providing a single link to OSM instead of two. Strangely the issues I had with templates with the new link not showing up properly resolved itself. Before I have seen a lot of wikitext showing up outside of the template. Sorry for being offline for a week, I am back and will be responding faster now. --Jarekt (talk) 04:45, 20 October 2016 (UTC)
Jarekt, there is some related discussion about it at phab:T145176#2784036 - I would love for the template to be simplified and only contain the most needed map/links. I hope we can contribute to the styling/usability of the template, and help community with it. тнояsтеn, could you elaborate the usecases that <maplink> does not solve. I would love for maplink to support all the ones that are frequently used by the community, but at the same time it shouldn't become a unmanageable collection of links and services that are not used by anyone - designers try to achive the "less is more" concept, where by providing only what's really needed, the service actually gains in usability and can continue improving. I even spoke with Dispenser (one of the main geohack maintainers) recently -- he did a lot of work trying to clean up geohack because otherwise many links simply get in the way of good usability. --Yurik (talk) 23:48, 9 November 2016 (UTC)
I like the idea of simplifying this template, but I also like to preserve the ability to get to where you want to get to with fewest clicks. For example current template is tapping into 4 different OSM based maps. The features I found two features particularly useful:
  • One click access to aerial photograph based map with overlay of commons images, like Google Maps, Google Earth
  • One click access to vector data based map with overlay of commons images, like OSM or Google Maps
I personally never use GeoHack (requires 2 clicks), or Proximityrama (see Category:Saint Basil's Cathedral for example), and I also have a feeling that not many people use Google Earth link. We could ask for people to vote for features the template was providing for years that they find useful. Another thing I like are links to objects in OSM, like the one you get when you click OSM icon at Institution:Louvre. I assume that many {{Object location}}s will be connected to Wikidata where geo outlines can be stored (maybe are already). --Jarekt (talk) 04:39, 10 November 2016 (UTC)
Speaking about German GeoHack, I know that local servies are widely used. Topographic maps for US (ACME), Switzerland, Germany, Iceland, Japan and so on. Global services like WikiMapia, Bing (bird's eye!) are useful from time to time. Furthermore, links to different OSM services on WMFLabs (WikiShootMe, Commons on OSM, ...) shouldn't be neglected. There are tons of great map services for specific purposes. OSM and Google are not everything. --тнояsтеn 07:40, 10 November 2016 (UTC)

new version of the templateEdit

I wrote new version of the template with several new features:

  1. icon with a link to new mw:Extension:Kartographer extension based OSM maps
  2. better integration with Wikidata which is mostly important for {{Object location}} templates used in Categories. When coordinates and wikidata q-code is provided we can
  • detect cases when wikidata is missing coordinates which we can provide
  • detect cases when there is a mismatch between Commons and Wikidata coordinates
  • detect cases when there is a match between Commons and Wikidata coordinates

See for example:

local coordinates

Camera location 34° 05′ 32.36″ N, 116° 09′ 24.55″ W      View all coordinates using: OpenStreetMap - Google Earth  

local + wikidata (matching)

Camera location 49° 42′ 32.73″ N, 8° 37′ 54.56″ E   View all coordinates using: OpenStreetMap - Google Earth    

wikidata only

Camera location 49° 42′ 33.12″ N, 8° 37′ 54.98″ E   View all coordinates using: OpenStreetMap - Google Earth    

Please review the new look and provide feedback. In most cases the template will not change at all except to extra OSM icon. --Jarekt (talk) 02:38, 24 October 2016 (UTC)

Layout issuesEdit

 
How I see it…

I use Monobook with the typography “update” features turned off. The previous version of this template used to be set in the same font as the surrounding text of the page, but now it’s forcing on me some nighmarish miskerned mess instead — looks like Verdana or some such silliness. Can hardcoded typeface settings be taken off the envolved CSS or whatever blunder is causing this mess, please? -- Tuválkin 18:38, 26 October 2016 (UTC)

I switched to monobook and the template looks fine (to me). I do not understand the typography “update” features turned off part. Can you elaborate and help me reproduce it? --Jarekt (talk) 18:54, 26 October 2016 (UTC)
I’m sorry I took so long to answer. Forget the bit about typography update, as it never affected Monobook, I was confused. As for the looks of the newly changed template as it gets displayed in mysetup, pls see this screenshot: While regular text and the orange warning template show in the same font (Arial — I know, I know!), the newly modified {{Location}} shows in a different, miskerned typeface — and tht should not happen. -- Tuválkin 14:03, 29 October 2016 (UTC)

No param for elevationEdit

The height above sea level is often an interesting property of a location; but the template does not yet have a parameter to show it. sarang사랑 10:26, 26 October 2016 (UTC)

We could do that, wikidata has elevation above sea level (P2044) property we could tap into and we could add a local parameter. So lets say Category:Salt Lake City has {{Object location}} template linked to wikidata and wikidata has elevation of 1,288±1 meters. We could display it in the {{Object location}} template but I am not convinced that it is desirable. That elevation does not mean much to me and will take space in the template and make it more cluttered. Elevations for individual photographs could be remarkably inaccurate as your phones and GPS units do not have a good way to measure GPS. Finally there is no big benefit to uploders to get it right or include it at all, no additional functionality is unlocked. --Jarekt (talk) 12:08, 26 October 2016 (UTC)
It may good for some organism photos as they only found in an altitude range. But only useful if can produce a search results based on a particular altitude or altitude range. Jee 12:15, 26 October 2016 (UTC)
Thank you. The pictures about hiking pathes and shelters are somehow incomplete without the altidude. And when there is a geo-location, it would not be bad if it is mentioned there. BTW, when pictures contain EXIF GPS the altitude is stored with this data. Of course it can be verified with other sources. So I thought one more optional parameter might be fine; but I can live without it, especially when nobody else wants this expansion. sarang사랑 16:51, 26 October 2016 (UTC)
I do not mind adding it if there is consensus on the subject and if we come up with some clever way to display it. My current position is   Neutral. So if we decide to add it. How should it be displayed? For the reference {{Object location|Wikidata=Q1025253}} gives the following source code:
Object location 49° 20′ 14″ N, 22° 04′ 03″ E   View this and other nearby images on: OpenStreetMap - Google Earth   
Can you two ( and other users) propose ways to add altitude? --Jarekt (talk) 18:50, 26 October 2016 (UTC)
Altitude would be useful in our many pictures from an airplane window. However, phone and camera GPS fixes in that circumstance are much less reliable than on the ground. Jim.henderson (talk) 14:37, 28 October 2016 (UTC)
I have some pictures from an airplane window but I have no way of knowing the altitude for any of them. it could be calculated from cameras field-of-view, resolution and size in pixels of known geographical features. However I doubt anybody wou go through that kind of calculations to tag an image. --Jarekt (talk) 14:44, 28 October 2016 (UTC)

Cat "Files with maps"Edit

Hi everyone, seems that all files using this template end up in the mentioned category. What is it for? And why is it not created yet? --Arnd (talk) 20:14, 2 November 2016 (UTC)

It looks like Kartographer extension which was recently added to {{Location}} template adds those. --Jarekt (talk) 02:10, 3 November 2016 (UTC)
Based on this patch: Differentiate tracking categories by namespace. Raymond 07:40, 3 November 2016 (UTC)
Return to "Location" page.