Difference between revisions of "Template:Coords"

From Hitchwiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
+
<includeonly><span class="plainlinks">
<span style="font-size: 12px; line-height: 12px; color:#555; display:block; float: right; margin: 5px; padding: 3px; background: #ebebeb; width: 200px;">'''Coordinates:'''  
+
{{#ifeq: {{{3|}}} | 1 |
[http://maps.google.com/maps?f=q&q={{#invoke:Coordinates|main|{{{1}}}|{{{2}}}}} {{#invoke:Coordinates|main|{{{1}}}|{{{2}}}}}]
+
  [http://maps.google.com/maps?f=q&q={{{1}}},{{{2}}}&ie=UTF8 <small><sup>Google</sup></small>]&nbsp;[https://www.openstreetmap.org/#map=18/{{{1}}}/{{{2}}} <small><sup>OSM</sup></small>] |
</span>
+
  '''Coordinates:'''''&nbsp;{{{1}}},&nbsp;{{{2}}}''&nbsp;[http://maps.google.com/maps?f=q&q={{{1}}},{{{2}}}&ie=UTF8 <small><sup>Google</sup></small>]&nbsp;[https://www.openstreetmap.org/#map=18/{{{1}}}/{{{2}}} <small><sup>OSM</sup></small>]
</includeonly><noinclude>
+
}}
 +
</span></includeonly><noinclude>
  
== Template usage ==
+
==Usage==
 +
*Go to Google Maps.
 +
*Right-click the location, click on the coordinates to copy.
 +
*4 decimals gives enough accuracy.
 +
*Input like this:'''<nowiki>{{Coords|49.9016|18.3063}}</nowiki>''' to display like this: {{Coords|49.9016|18.3063}}
 +
*To only get the superscripted links to Maps and OSM set the 3rd input to "1" like this:'''<nowiki>{{Coords|49.9016|18.3063|1}}</nowiki>''' {{Coords|49.9016|18.3063|1}}
  
To use this template, input the latitude and longitude values using the format:
 
<nowiki>{{Coords|Latitude|Longitude}}</nowiki>
 
  
Example:
+
[[Category:Templates]]
<nowiki>{{Coords|48.8584|2.2945}}</nowiki>
 
 
 
[[Category:Templates|Coords]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 19:11, 12 April 2025


Usage

  • Go to Google Maps.
  • Right-click the location, click on the coordinates to copy.
  • 4 decimals gives enough accuracy.
  • Input like this:{{Coords|49.9016|18.3063}} to display like this:

Coordinates: 49.9016, 18.3063 Google OSM

  • To only get the superscripted links to Maps and OSM set the 3rd input to "1" like this:{{Coords|49.9016|18.3063|1}}

Google OSM