Editing ClubWiki:Using GMaps
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
This wiki site uses a MediaWiki extension called Maps. It's full syntax description can be found at its [ | This wiki site uses a MediaWiki extension called Google Maps. It's full syntax description can be found at its [http://www.mediawiki.org/wiki/Extension:Google_Maps/Syntax home site]. Here we will just describe the basic features typically used for this site for simplicity for our users | ||
== Basic use == | == Basic use == | ||
The map is invoked by using the following basic structure | The Google map is invoked by using the following basic structure | ||
<pre> | <pre> | ||
< | <googlemap options> | ||
(optional and multiple possible) KML file locations | |||
(optional and multiple possible) pin locations | (optional and multiple possible) pin locations | ||
</ | </googlemap> | ||
</pre> | </pre> | ||
Line 14: | Line 15: | ||
== Extension options == | == Extension options == | ||
Available coding options are | Available coding options are: | ||
* | * width (in pixels; default is 740) | ||
* | * height (in pixels; default is 600) | ||
* | * lat (the center latitude on the map) | ||
* lon (the center longitude on the map) | |||
* zoom (the zoom level; 0 is the furthest away, 21 is the closest in; 15 is closest zoom for terrain) | * zoom (the zoom level; 0 is the furthest away, 21 is the closest in; 15 is closest zoom for terrain) | ||
* type (" | * type ("normal" or "map", "hybrid", or "satellite"; default is "hybrid") | ||
* controls ( | * controls (''small'' creates +/- zoom buttons, ''medium'' has zoom buttons and pan buttons, ''large'' has pan buttons with a sliding scale for zoom, and ''none'' has no buttons) | ||
* | * selector (show the map/hybrid/satellite selector? ''yes'' (default) and ''no''.) | ||
* | * scale (show the distance scale? ''yes'' and ''no'' (default).) | ||
* | * overview (show the inset navigation map? ''yes'' and ''no'' (default).) | ||
* | * icons (web address if the marker icon is customized. With "{label}" where the name of the icon will be inserted; defaults to "<nowiki>http://maps.google.com/mapfiles/marker{label}.png</nowiki>") | ||
* | * icon (web address if the marker icon is not specified; the default icon is [http://maps.google.com/mapfiles/marker.png http://maps.google.com/mapfiles/marker.png]) | ||
* | * units ("meters" or "miles"; default is "meters".) | ||
All attributes are optional. If it is not specified the above described default will be assumed. | All attributes are optional. If it is not specified the above described default will be assumed. | ||
Line 34: | Line 36: | ||
<pre> | <pre> | ||
< | <googlemap lat="36.500667" lon="-82.47797" zoom="12" width="500" height="400" type="map" controls="small"> | ||
</ | </googlemap> | ||
</pre> | </pre> | ||
== KML files == | == KML files == | ||
Before you specify any markers, you can add URL(s) that point to [http://en.wikipedia.org/wiki/Keyhole_Markup_Language KML] files. Each URL should be on its own line, e.g. | |||
< | <nowiki><googlemap></nowiki> | ||
</ | <nowiki>http://some.url/</nowiki> | ||
<nowiki>http://other.url/</nowiki> | |||
... | |||
<nowiki></googlemap></nowiki> | |||
These files will be dynamically imported into the map each time the map is loaded. For now, any new KMLs must be emailed to the [mailto:webmaster@tehcc.org webmaster] for uploading to the site | These files will be dynamically imported into the map each time the map is loaded. For now, any new KMLs must be emailed to the [mailto:webmaster@tehcc.org webmaster] for uploading to the site. | ||
== Pins == | == Pins == | ||
Pins are added by using the following syntax within the <nowiki>< | Pins are added by using the following syntax within the <nowiki><googlemap></nowiki> tags: | ||
<pre> | <pre> | ||
lat,lon,balloon title (title will be auto linked to a page on this wiki) | |||
balloon text and/or images, can be multiple lines | |||
</pre> | </pre> | ||
Full coding showing two pins, the first with a linked title and regular text | Full coding showing two pins, the first with a linked title and regular text and the second with no linked title but regular text and a small image: | ||
<pre> | <pre><googlemap version="0.9" lat="36.500667" lon="-82.47797" type="terrain" zoom="15" width="715" height="350" scale="yes" controls="large"> | ||
< | 36.50013,-82.47760,WPSP Sinking Waters | ||
36.50013,-82.47760 | Here is the location of the trail head | ||
36.502891,-82.468700 | 36.502891,-82.468700 | ||
</ | Intersection to/from [[WPSP_Fall_Creek_Loop_Trail|Fall Creek Loop]] | ||
[[Image:To D Backbone Trail.jpg|150px|Trail head sign]] | |||
</googlemap> | |||
</pre> | </pre> | ||
The above commands can be used many times within a single map to create the pins needed | |||
The above commands can be used many times within a single map to create the pins needed | |||
== Pin icons == | == Pin icons == | ||
Icons can be changed by two methods, changing all undefined icons to a specified one or invoking the custom icon list used on this site and then specifying pin by pin which icon to display for the pin | Icons can be changed by two methods, changing all undefined icons to a specified one or invoking the custom icon list used on this site and then specifying pin by pin which icon to display for the pin | ||
=== Default Pin Icons === | === Default Pin Icons === | ||
The default icon used for pins can be changed by adding an icon command in the extension options: | The default icon used for pins can be changed by adding an icon command in the extension options: | ||
Add the icon address in quotes to the | 1. Add the icon address in quotes to the googlemap tag, using '''icon''': | ||
< | <nowiki><googlemap lat="36.072635" lon="-79.791975" icon="http://images.wikia.com/walkingdead/images/7/70/Markerfight.png"></nowiki> | ||
< | Full coding example: | ||
38.453857,-84.356461 | <nowiki><googlemap lat="36.072635" lon="-79.791975" icon="http://images.wikia.com/walkingdead/images/7/70/Markerfight.png"></nowiki> | ||
38.453857, -84.356461, Rick Grimes Shot | |||
<nowiki></googlemap></nowiki> | |||
</ | |||
=== Custom icons === | === Custom icons === | ||
This site has a list of custom icons that can be used. See the [[#Icons reference]] to know which letters will invoke which icon | |||
#Add the following extension '''icons''' option: | |||
##<nowiki><googlemap lat="36.500667" lon="-82.47797" icons="http://tehcc.org/clubwiki/kml/marker{label}.png"></nowiki> | |||
#Prefix the pin coordinates with (X) where 'X' is the letter for the pin icon desired | |||
##<nowiki>(G) 36.502891,-82.468700</nowiki> | |||
Full coding of a custom icon map: | Full coding of a custom icon map: | ||
<pre> | <pre> | ||
< | <googlemap lat="36.500667" lon="-82.47797"width="715" height="350" icons="http://tehcc.org/clubwiki/kml/marker{label}.png"> | ||
36.50013,-82.47760 | (E) 36.50013,-82.47760 | ||
36.502632,-82.482759 | Fall Creek Falls | ||
36.502891,-82.468700 | [[Image:WPSP Fall Creek Falls.jpg|150px|Fall Creek Falls]] | ||
</ | (A) 36.502632,-82.482759 | ||
Parking along Fall Creek Road | |||
(G) 36.502891,-82.468700 | |||
Intersection to/from [[WPSP_Fall_Creek_Loop_Trail|Fall Creek Loop]] | |||
[[Image:To D Backbone Trail.jpg|150px|Trail head sign]] | |||
</googlemap> | |||
</pre> | </pre> | ||
==== Icons reference ==== | ==== Icons reference ==== | ||
Icons in use at this site | Icons in use at this site | ||
{| class="wikitable" style="text-align: left; border=1" | {| class="wikitable" style="text-align: left; border=1" | ||
! | !Letter | ||
!Icon | !Icon | ||
!Meaning | !Meaning | ||
|---- | |---- | ||
| | |A | ||
| | |http://tehcc.org/clubwiki/kml/markerA.png | ||
|Parking | |Parking | ||
|---- | |---- | ||
| | |B | ||
| | |http://tehcc.org/clubwiki/kml/markerB.png | ||
|Picturesque location | |Picturesque location | ||
|---- | |---- | ||
| | |C | ||
| | |http://tehcc.org/clubwiki/kml/markerC.png | ||
|Waterfall | |Waterfall | ||
|---- | |---- | ||
| | |D | ||
| | |http://tehcc.org/clubwiki/kml/markerD.png | ||
|Alternate for picturesque | |Alternate for picturesque | ||
|---- | |---- | ||
| | |E | ||
| | |http://tehcc.org/clubwiki/kml/markerE.png | ||
|Overlook | |Overlook | ||
|---- | |---- | ||
| | |F | ||
| | |http://tehcc.org/clubwiki/kml/markerF.png | ||
|Shelter | |Shelter | ||
|---- | |---- | ||
| | |G | ||
| | |http://tehcc.org/clubwiki/kml/markerG.png | ||
|Trailhead/intersection/point of interest | |Trailhead/intersection/point of interest | ||
|---- | |---- | ||
| | |H | ||
| | |http://tehcc.org/clubwiki/kml/markerH.png | ||
|Campground | |Campground | ||
|---- | |---- | ||
| | |I | ||
| | |http://tehcc.org/clubwiki/kml/markerI.png | ||
|Cave | |Cave | ||
|---- | |---- | ||
| | |J | ||
| | |http://tehcc.org/clubwiki/kml/markerJ.png | ||
|Water crossing - no bridge - rock-hopping | |Water crossing - no bridge - rock-hopping | ||
|---- | |---- | ||
| | |K | ||
| | |http://tehcc.org/clubwiki/kml/markerK.png | ||
|Bench | |Bench | ||
|---- | |---- | ||
| | |L | ||
| | |http://tehcc.org/clubwiki/kml/markerL.png | ||
|Trail bridge | |Trail bridge | ||
|---- | |---- | ||
| | |M | ||
| | |http://tehcc.org/clubwiki/kml/markerM.png | ||
|Cell Tower/Antenna | |Cell Tower/Antenna | ||
|---- | |---- | ||
| | |N | ||
| | |http://tehcc.org/clubwiki/kml/markerN.png | ||
|Cemetery | |Cemetery | ||
|---- | |---- | ||
| | |O | ||
| | |http://tehcc.org/clubwiki/kml/markerO.png | ||
|Playground | |Playground | ||
|---- | |---- | ||
| | |Q | ||
| | |http://tehcc.org/clubwiki/kml/markerQ.png | ||
|Toilet | |Toilet | ||
|---- | |---- | ||
| | |R | ||
| | |http://tehcc.org/clubwiki/kml/markerR.png | ||
|Tunnel | |Tunnel | ||
|---- | |---- | ||
| | |S | ||
| | |http://tehcc.org/clubwiki/kml/markerS.png | ||
|Picnic Area | |Picnic Area | ||
|---- | |---- | ||
|} | |} | ||
Search http://code.google.com/p/google-maps-icons/ for other icons to suggest, send to [mailto:webmaster@tehcc.org webmaster] for inclusion | |||
== Examples == | == Examples == | ||
Line 275: | Line 192: | ||
*[[Warriors Path State Park]] - Shows multiple KML files in use | *[[Warriors Path State Park]] - Shows multiple KML files in use | ||
*[[WPSP Devil's Backbone|Devil's Backbone]] - Multiple KML files and many pins showing pictures and more | *[[WPSP Devil's Backbone|Devil's Backbone]] - Multiple KML files and many pins showing pictures and more | ||