Difference between revisions of "Template:Maplink"

From Wikispooks
Jump to navigation Jump to search
m (Text replacement - "WikiSpooks" to "Wikispooks")
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 
This template is to facilitate linking to Google Maps.
 
This template is to facilitate linking to Google Maps.
The general format for Google maps addresses on WikiSpooks is:  
+
The general format for Google maps addresses on Wikispooks is:  
  
*<Code><nowiki>http://maps.google.com/maps?q=loc:[latitude,longitude]&z=11 </nowiki></code>  
+
*<Code><nowiki>http://maps.google.com/maps?q=loc:[latitude,longitude] &z=15</nowiki></code>  
 
where "latitude" and "longitude" are decimal number coordinates and represented in the template as a single parameter consisting of the decimal latitude and longitude coordinates separated by a comma.
 
where "latitude" and "longitude" are decimal number coordinates and represented in the template as a single parameter consisting of the decimal latitude and longitude coordinates separated by a comma.
  
The <code><nowiki> "q=loc:" and "&z=11" are fixed by the template to ensure that a location marker is included on the map and the initial zoom level is set to 10 </nowiki></code>
+
The <code><nowiki> "q=loc:" and "&z=15" are fixed by the template to ensure that a location marker is included on the map and the initial zoom level is set to 15 </nowiki></code>
  
 
Its usage is (copy and paste)  
 
Its usage is (copy and paste)  
Line 12: Line 12:
 
:<code><nowiki> {{Maplink|Coordinates}} </nowiki></code>
 
:<code><nowiki> {{Maplink|Coordinates}} </nowiki></code>
 
Replacing "Coordinates" with the decimal longitude and latitude coordinates separated by a comma as in <code><nowiki>40.12345,120.3456</nowiki></code>
 
Replacing "Coordinates" with the decimal longitude and latitude coordinates separated by a comma as in <code><nowiki>40.12345,120.3456</nowiki></code>
</noinclude>[http://maps.google.com/maps?q=loc:{{{1}}}&z=11 Map]
+
</noinclude>[http://maps.google.com/maps?q=loc:{{{1}}}&z=15&t=k Map]

Latest revision as of 17:17, 14 October 2018

This template is to facilitate linking to Google Maps. The general format for Google maps addresses on Wikispooks is:

  • http://maps.google.com/maps?q=loc:[latitude,longitude] &z=15

where "latitude" and "longitude" are decimal number coordinates and represented in the template as a single parameter consisting of the decimal latitude and longitude coordinates separated by a comma.

The "q=loc:" and "&z=15" are fixed by the template to ensure that a location marker is included on the map and the initial zoom level is set to 15

Its usage is (copy and paste)

{{Maplink|Coordinates}}

Replacing "Coordinates" with the decimal longitude and latitude coordinates separated by a comma as in 40.12345,120.3456 Map