Difference between revisions of "Template:Locate"

From Bhamwiki
Jump to: navigation, search
(Categorize, give usage, tweak)
(Notes)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<p style="float: right; background-color: #eee; border: 1px solid #999; padding: .2em; font-size: smaller;">[http://maps.google.com/maps?ll={{{lat}}},{{{lon}}}&spn=0.1,0.1&q={{{lat}}},{{{lon}}} Locate on map]</p>
+
<p style="float: right; background-color: #eee; border: 1px solid #999; margin-left: 1em; padding: .2em; font-size: smaller;">[http://maps.google.com/maps?ll={{{lat}}},{{{lon}}}&z={{{zoom|12}}}&q={{{lat}}},{{{lon}}}&t={{{type|m}}} Locate with<br>Google Maps]</p><noinclude>
<noinclude>
+
<p><br><br><br></p>
<p><br><br></p>
+
  
----
+
'''Parameters:'''
 +
*'''lat''' (latitude as decimal)
 +
*'''lon''' (longitude as decimal)
 +
*'''zoom''' (0-17, recommended 10-16, defaults to 12)
 +
*'''type''' ("m" for map (default), "k" for satellite, "p" for terrain, "h" for hybrid)<sup>1</sup>
  
The parameters are "lat" (latitude) and "lon" (longitude).  These must be entered in decimal representation, not degrees, minutes, and seconds.  [http://www.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html This page] can be used to do the conversion if needed.
+
Latitude and longitude must be entered in decimal representation, not degrees, minutes, and seconds.  [http://www.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html This page] can be used to do the conversion if needed.  Keep in mind that Birmingham is located at coordinates north and west, meaning that the latitude is positive, but ''the longitude is negative''.
  
Keep in mind that Birmingham is located at coordinates north and west, meaning that the latitude is positive, but ''the longitude is negative''.
+
Also note that floating an image to the right immediately below this template can cause the image to hide some of the text.
 +
 
 +
<sup id="note1">1</sup> Don't blame me. That's Google Maps doing. Bhamwiki doesn't let me make it more user-friendly right now.
 +
 
 +
----
 +
 
 +
<p style="float: right; background-color: #eee; border: 1px solid #999; margin-left: 1em; padding: .2em; font-size: smaller;">[http://maps.google.com/maps?ll=33.4683,-86.8081&z=12&q=33.468306,-86.808146&t=m Locate with<br>Google Maps]</p>
  
 
'''Example:'''<br>
 
'''Example:'''<br>
<nowiki>{{</nowiki>Locate |<br>
+
<nowiki>{{</nowiki>Locate | lat=33.4683 | lon=-86.8081 <nowiki>}}</nowiki>
lat=33.468306 |<br>
+
 
lon=-86.808146<br>
+
==Notes==
<nowiki>}}</nowiki>
+
Per [http://xkcd.com/2170/ this XKCD chart], there probably aren't many times we'd have any reason to go beyond four digits after the decimal point in our lat/lon fields. Maybe 5 digits for a statue in a park or something.
  
[[Category:Bhamwiki_templates]]
+
[[Category:Mapping_templates|Locate]]
 
</noinclude>
 
</noinclude>

Latest revision as of 07:08, 9 July 2019

Locate with
Google Maps




Parameters:

  • lat (latitude as decimal)
  • lon (longitude as decimal)
  • zoom (0-17, recommended 10-16, defaults to 12)
  • type ("m" for map (default), "k" for satellite, "p" for terrain, "h" for hybrid)1

Latitude and longitude must be entered in decimal representation, not degrees, minutes, and seconds. This page can be used to do the conversion if needed. Keep in mind that Birmingham is located at coordinates north and west, meaning that the latitude is positive, but the longitude is negative.

Also note that floating an image to the right immediately below this template can cause the image to hide some of the text.

1 Don't blame me. That's Google Maps doing. Bhamwiki doesn't let me make it more user-friendly right now.


Locate with
Google Maps

Example:
{{Locate | lat=33.4683 | lon=-86.8081 }}

Notes

Per this XKCD chart, there probably aren't many times we'd have any reason to go beyond four digits after the decimal point in our lat/lon fields. Maybe 5 digits for a statue in a park or something.