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}}


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).

Information about the mapping toolsEdit

The   icon links the Commons:Geocoding page, however I can find nothing about the database for GaoHack there. Generally, I found no documentation nor discussion page about GeoHack. For example, I would like to know a system of updating of the database. Sometimes new images are displayed almost immediately in the linked maps, sometimes they have many days delay. Besides it, location templates should contain a warning about frequent (possible) failures of the map services. --ŠJů (talk) 12:04, 27 September 2016 (UTC)

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 this and other nearby images on: 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)

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 this and other nearby images on: OpenStreetMap - Google Earth  

local + wikidata (matching)

Camera location 49° 42′ 32.73″ N, 8° 37′ 54.56″ E   View this and other nearby images on: OpenStreetMap - Google Earth    

local + wikidata (mismatching)

Camera location 49° 42′ 32.73″ N, 9° 37′ 54.56″ E   View this and other nearby images on: OpenStreetMap - Google Earth    

local + wikidata (missing on Wikidata)

Camera location 49° 42′ 32.73″ N, 9° 37′ 54.56″ E   View this and other nearby images on: OpenStreetMap - Google Earth    

wikidata only

Camera location 49° 42′ 33.12″ N, 8° 37′ 54.98″ E   View this and other nearby images on: 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

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)

Finding nearby imagesEdit

How can I find nearby or images from same location? I tried OpenStreetMap link on "Camera location" in file pages; but it gives only one another image from that location even when there are a lot of files/images available. Jee 03:00, 24 October 2016 (UTC)

I think the problem is that multiple images are encoded with exactly the same coordinates like this or this so their icons show up on top of each other. If your position changed even by a few feet while taking those photographs and your coordinates capture that than you will be able to tell them apart. --Jarekt (talk) 11:44, 26 October 2016 (UTC)
I understand. But that's only the coordinates of the park. We are not using GPS to mark every photo we takes. Jee 12:11, 26 October 2016 (UTC)
That is the problem. The {{Location}} template was meant for "camera coordinates" with default precision of less than a meter. You should use precision "prec" parameter to be clear that those are not accurate coordinates, but that will not help you with display. The only thing I can think of would be to add a bit of random noise to your coordinates the way I did with 2 images mentioned. Those 2 should eventually show up separately. --Jarekt (talk) 12:31, 26 October 2016 (UTC)
Thanks for the hint. It may not worth to add random noise to all my existing works. Will consider for future uploads. :) Jee 12:45, 26 October 2016 (UTC)

Media containing EXIF GPSEdit

Might be interesting to have a category with all images (or other files) whose EXIF data contain GPS data. I found only the template GPS EXIF but this is something else, and it will be removed after replacements by the bot. sarang사랑 10:26, 26 October 2016 (UTC)

there is probably a way to search the database by a query to find such files, but I can not think of a reason why we would want to spend effort researching and writing it. Sarang can you thing of potential use? --Jarekt (talk) 11:49, 26 October 2016 (UTC)
Thank you. I was just thinking that we have categories for everything, and I missed that one. But you are right, the advantage of such a category is rather poor. sarang사랑 16:51, 26 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)
Return to "Location" page.