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

The ID entered is unknown to the system. Please use a valid entity IDEdit

Could someone please look after this error which is displayed at the template page? --Arnd (talk) 14:11, 27 May 2016 (UTC)

 Done --Jarekt (talk) 11:51, 2 June 2016 (UTC)


Hi everybody, I am missing the altitude. Some people are already using the third parameter for it which leads to parsing problems when adding the heading, example. Is there a way to add altitude? --Arnd (talk) 18:20, 27 May 2016 (UTC)

Altitude makes sense if you are flying otherwise you can always look it up based on location. I am fine with adding it for aerial photographs, but otherwise it seems unnecessary. --Jarekt (talk) 01:49, 28 May 2016 (UTC)
I know, but i'd like to see it in this template ;-) --Arnd (talk) 04:06, 28 May 2016 (UTC)
The question for me is, how to deal with the location templates that have three numerical values. If we do not want to use the altitude at all, we should delete it the third parameter because otherwise is causes problem as Category:Media with erroneous locations shows. It fills up because my Bot is currently adding the headings to the template. --Arnd (talk) 04:41, 2 June 2016 (UTC)
I would deal with them the same way you deal with any other template that is using wrong syntax: you remove parts that cause trouble. Alternative approach would be to add parameter "alt" or "altitude", which would be unused at this point, but might be used in the future. --Jarekt (talk) 11:44, 2 June 2016 (UTC)
Ok, it think that i will delete them. If we once decide that we need the altitude we can add it for all files that have this information. Btw, i seems that even the UploadWizard added the malformed location template for some time. --Arnd (talk) 06:12, 7 June 2016 (UTC)

Use Exif directly from fileEdit

Hi all, wouldn't it make sense to use the Exif data directly instead of extracting it and adding it to the template? --Arnd (talk) 05:06, 28 May 2016 (UTC)

I do not know a way of accessing EXIF data from LUA. I do not think I can even get file dimension or URL of the full resolution file. --Jarekt (talk) 11:52, 2 June 2016 (UTC)
Can't LUA call the WikiAPI [1]? And, how is the Metadata section at the bottom of the file description is generated? --Arnd (talk) 04:54, 3 June 2016 (UTC)
That would be undesirable. Technically, all the information shown on file description pages could be stored in and extracted from the files' metadata, but EXIF data is frequently wrong and/or incomplete and can't readily be edited. Because of this, extraction to editable wiki markup is preferable. LX (talk, contribs) 08:36, 3 June 2016 (UTC)

Include OSM mapEdit

How about including an OSM map with the new feature (mw:Extension:Kartographer)?

It could look like this: 44° 28′ 52.43″ N, 10° 07′ 22.8″ E (OSM)

--тнояsтеn 11:06, 20 June 2016 (UTC)

We already have links to 2 OSM based maps. If you look at
Camera location 38° 02′ 30.98″ N, 81° 01′ 28.87″ W View this and other nearby images on: OpenStreetMap - Google Earth
and click "OpenStreetMap" you get to one OSM map and if you click the globe you get the other OSM map: meta:WikiMiniAtlas. Both are also showing location of other images. We could add a third link to OSM map, however it does not show locations of other commons images (or categories) and it is unclear why it would be better than the other two. If there is some advantage we should replace one of the current links. --Jarekt (talk) 18:27, 20 June 2016 (UTC)
Jarekt - you are right - the existing Wikiminiatlas is an awesome technology, both visually and feature-wise. The problem with it is that it does not scale. We cannot show that map to all Wikipedia users - it will simply crash the servers. Also, Daniel, the author with whom I spoke extensively about it, is basically the only person supporting that technology, whereas there is now all sorts of very powerful open source technologies that we can use. If you click on the new map link, you will see how fast it pops up. There are already 20 servers serving the map, and there will soon be more. As for the features - yes, its a work in progress - we just launched, it takes time, but hopefully we will match and exceed the feature set :) --Yurik (talk) 00:47, 22 June 2016 (UTC)
Yurik I agree that mw:Extension:Kartographer will be a good addition to this template, and I can work on adding it to module:Coordinates once we have consensus and some idea on how to gracefully include it. One problem with Wikiminiatlas is that it is really hard to find. Unless you know about it you are not likely to click in that globe, so I would advice against replacing it. The other OpenStreetMap link links to WIWOSM written by User:Kolossos and others. And I did notice that the new maps come up quite fast, but WIWOSM was equally fast. Maybe we should keep both of them and let users decide which one they prefer. Current wording View this and other nearby images on: suggest that you will see nearby images once you click, so it might not be the right place for it. On File:Adirondacks_-_Rolling_Pond_Campground_bouldering.JPG I was toying with the idea of converting {{Location}} into collapsible template, but I think it is a bad idea, since I guess the map will be rendered even if it is never displayed. We could wemove this wording and add more links to mw:Extension:Kartographer maps and may be to Google Maps again. I find aerial photography particularly useful when you are not in the cities. We could also replace words with icons, like we do in Institution:Glyptothek Munich and other institution templates. Any ideas? --Jarekt (talk) 02:48, 22 June 2016 (UTC)
Jarekt, it is a blessing that WikiMiniAtlas is hard to find - it already works very slowly, and at times it was down for many weeks. The service that Kolossos built is also great (I need to double check where it is running - I might see him in the near future at one of the OSM conferences). But neither of them are hosted by WMF and/or cannot handle large amounts of traffic. They may both work ok if we have them as links, but we cannot make them into always-on frames - for two reasons: one is legal - we cannot show external content as part of the default page view without user's explicit desire to view it - for privacy reasons. Second reason is that most of these services cannot handle large traffic as generated by Wikipedia. Granted that Commons has significantly smaller viewership to significantly affect an external site. That said, I agree that other sites like Google maps provide a very useful service, and maybe there should be a way for users to customize their experience to easily access those services. --Yurik (talk) 15:40, 22 June 2016 (UTC)
I think I am convinced that we should use mw:Extension:Kartographer in this template. I am currently quite busy at rewriting {{Creator}}, and all the templates it calls in Lua and mopping up after conversion of {{Authority control}} to LUA. I will not have time to work on this template in near future. Can anybody else spearhead this development? I can help with final testing and roll-out. --Jarekt (talk) 18:34, 12 September 2016 (UTC)

I am pleased that the OSM map is available, as its information differs from what Google Earth provides when it is working. However, the template also promises to show nearby images. It does not, and they would be especially useful when the Google Earth link gives "502 Bad Gateway" as it has been doing in the past few hours. Jim.henderson (talk) 11:51, 21 September 2016 (UTC)

You are right Jim.henderson OSM tool on wmflabs no longer shows nearby images. I wonder what is wrong with it. --Jarekt (talk) 13:56, 21 September 2016 (UTC)
Works for me. But it is not unusual that some tools are down from time to time. --тнояsтеn 20:40, 21 September 2016 (UTC)

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)

Return to "Location" page.