Last modified on 30 March 2015, at 11:35

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

Too often out of serviceEdit

The map tools linked by "View this and other nearby images on:" are (in last years) too often out of service (maybe, more time is out of service than in service). That causes that many of Commons users don't know what the functions should really do. I propose to add a noticeable warning about it to the text of the template. Would be possible also any detection of the tool which can e.g. red/green icon dependently signalizing that the tool is out/ready? --ŠJů (talk) 08:59, 27 January 2015 (UTC)

Wait a moment, {{editprotected}} is for precise instructions what should be done. The template only invokes Module:Coordinates, and I don't get how this module should display a warning. Or do you want a warning in {{location/doc}}? The documentation isn't protected. Collecting good coordinates for MRD certainly works, GeoHack, OSM, Google Maps, and the mini atlas also tend to work (or rather, sometimes this or that doesn't, but the rest works). –Be..anyone (talk) 10:33, 27 January 2015 (UTC)
By my rough estimate, in 7 of 10 attempts to use the function, the "other nearby images" are not displayed (although the linked maps are opened in correct place with correct coordinates). In rare lucky cases only.
The explaining warning is needed to be displayed at the image pages bellow the links in the template. It doesn't matter whether through Module:Coordinates or directly through the template. As i know, texts from the documentation page are not displayed in the template. The precise formulation of the warning depends on the fact whether is possible or not to detect readiness of the tool. --ŠJů (talk) 00:52, 28 January 2015 (UTC)
I diverted this discussion to Module talk:Coordinates. --ŠJů (talk) 00:58, 28 January 2015 (UTC)

ŠJů, I just tried it and the links to OSM, Google Earth and WikiMiniAtlas (accessed by clicking in the globe icon) worked just fine, while Google Maps send me to this page which claims that the KML approach we used to display the information in Google maps will no longer be supported, and will have to be rewritten using "Google Maps JavaScript API". At least that is my read of the page. The Google Maps support is provided by maintained by user:Para. I do not know if my assessment, that it needs a rewrite, is correct and if so then if there are plans to do the rewrite. We could remove "Google Maps" from the list until it is fixed. Also pinging @Kolossos: and @Dschwen: who might know more about it. --Jarekt (talk) 03:41, 17 February 2015 (UTC)

Yes, Google Maps are taking down the feature we've been using. I looked into it a bit here. I don't know how complicated it would be to make their API work through nested kmls or view based networklinks, but it's at least not as simple as putting in the pointer kml into Google's sample Javascript (as done on JSFiddle for example with a kml that contains the placemarks directly). --Para (talk) 08:48, 17 February 2015 (UTC)
As former Google Maps APIv2 "developer" (one set of iGoogle tiny maps gadgets) I recommend to drop Google Maps support completely, and invest any free time in projects unrelated to Google. –Be..anyone (talk) 09:15, 17 February 2015 (UTC)
OK so unless there is opposition tomorrow I will remove "Google Maps" link for time being and we can add it if the issue is resolved. One could still get to Google Maps by clicking on the coordinates to go to Geohack, where there will be Google Maps link. --Jarekt (talk) 13:42, 17 February 2015 (UTC)
✓ Done--Jarekt (talk) 04:40, 1 March 2015 (UTC)
Could Bing Maps possibly replace it? I sometimes use that anyway for its sometimes superior slant views, but getting into it is cumbersome without a link. Jim.henderson (talk) 17:45, 2 March 2015 (UTC)
It could if anybody writes a tool to show images nearby current image in Bing. Otherwise click on the coordinates to get to geohack and pick your favorite map website. --Jarekt (talk) 18:27, 2 March 2015 (UTC)

Headings for objects?Edit

The documentation for {{Object location}} discusses heading parameters, and uses them in examples. Shouldn’t these be deprecated for object locations? Even where an object has a fixed orientation (e.g. faces of mountains, doorways of buildings) it will still be possible to depict from a variety of positions, especially in a close-up. If the parameter is intended to describe an object‘s orientation, however, there should be an explanation of the appropriate conventions (e.g. along the faces or walls, or perpendicular to them? facing in or out?).—Odysseus1479 (talk) 01:27, 22 February 2015 (UTC)

Heading of a camera has exactly the same meaning in case of object or camera locations. If you imagine a vector going from camera to an central object than {{location}} describes starting point and direction, and {{Object location}} describes ending point and direction, but in both cases direction is the same. --Jarekt (talk) 02:58, 22 February 2015 (UTC)
Sure, but the bearing of the camera-to-object line is a property of that particular photo, not the object itself. In case it’s not clear, I’m thinking of locations in categories, not individual files. Anything there should be an intrinsic property, or at least one that pertains to every file underneath. Or, if a camera is presumed to be be involved in every use of this template, is there a different object-location template for application to categories?—Odysseus1479 (talk) 03:22, 22 February 2015 (UTC)
Agreeing with Odysseus1479 here. The only exception is categories containing only (different versions of the same) one image, such as this one. In general, as a coarse rule, {{camera location}} belongs in photos and {{object location}} belongs in categories. -- Tuválkin 05:37, 22 February 2015 (UTC)
I can think of another ‘edge case‘: some popular-landmark cats containing very numerous images have been broken down into “Views of X from Y“ subcats (as well as by season, year, weather, …), and for many of those—the more distant, anyway—a heading parameter could apply. But these also are fairly rare, and are arguably distinct as view-cats from their parent object-cats.
I can see a case for the use of {{Object location}} in files where the camera position is unknown, high precision is required, and there‘s no object cat suitable to tag with the geolocation. Again a rather unusual circumstance.—Odysseus1479 (talk) 05:53, 22 February 2015 (UTC)
I agree in majority of the cases heading has no meaning in case of {{Object location}} placed in categories (with a few exceptions mentioned above). If you find any than they should be deleted.--Jarekt (talk) 19:54, 22 February 2015 (UTC)

Adding a link to Google MapsEdit

Since Google Maps is by far the most used mapping provider out there, I propose that this template be edited to provide a link to Google Maps. This could either supplement or replace the Google Earth link. The Google Earth link does not even work and instead prompts to download a "doc.kml" file. OSX (talkcontributions) 03:01, 30 March 2015 (UTC)

See the second topic above this one: Google Maps recently changed their interface, so the links (now broken) have been taken out until the necessary code can be developed to connect to their new system. As for Google Earth, AFAIK it doesn’t exist in any Web-hosted form, so a KML file is the closest available approximation to a link.—Odysseus1479 (talk) 04:49, 30 March 2015 (UTC)
Hi, thanks for getting back to me. I understand that the old quasi-Google Maps interface (with Wikimedia changes) linked from the template previously is no longer available. What I am suggesting is using the standard Google Maps website. If the coordinates are 51.483778,-0.606139, then,-0.606139 works as a link. OSX (talkcontributions) 05:47, 30 March 2015 (UTC)
Return to "Location" page.