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 [https://www.semantic-mediawiki.org/wiki/Category:Maps_examples home site]. Here we will just describe the basic features typically used for this site for simplicity for our users.
This wiki site uses a MediaWiki extension called Maps. It's full syntax description can be found at its [https://www.semantic-mediawiki.org/wiki/Category:Maps_examples home site]. Here we will just describe the basic features typically used for this site for simplicity for our users


== Basic use ==
== Basic use ==
Line 27: Line 27:
* gkml (list URLs to kmls separated by a comma)
* gkml (list URLs to kmls separated by a comma)
* markercluster (automatically groups crowded pins and zooms on click; default no)
* markercluster (automatically groups crowded pins and zooms on click; default no)
* icon (Default icon to use for all markers/pins - only can apparently use an image on this site without the "File:" prefix)


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 43: Line 42:
KMLs are now specified within the open command. Using the kml (not sure when this is used) or gkml (the one we seem to need to use) you can add URL(s) that point to [http://en.wikipedia.org/wiki/Keyhole_Markup_Language KML] files. Each URL should be separated by a comma.
KMLs are now specified within the open command. Using the kml (not sure when this is used) or gkml (the one we seem to need to use) you can add URL(s) that point to [http://en.wikipedia.org/wiki/Keyhole_Markup_Language KML] files. Each URL should be separated by a comma.


<pre><display_map gkml="https://tehcc.org/clubwiki/kml/Pinnacle_Mountain_Tower_Trail.kml,http://other.url/,...">
<pre><display_map gkml="http://tehcc.org/clubwiki/kml/Pinnacle_Mountain_Tower_Trail.kml,http://other.url/,...">
</display_map></pre>
</display_map></pre>


Line 50: Line 49:
== Pins ==
== Pins ==
Pins are added by using the following syntax within the <nowiki><display_map></nowiki> tags. The different attributes of the pin are separated by tildes (~).  
Pins are added by using the following syntax within the <nowiki><display_map></nowiki> tags. The different attributes of the pin are separated by tildes (~).  
<pre>
<pre>
Location~Title~Details~Icon~Visited Icon?~Label~???
Location~Title~Details~Icon~Label~Visited Icon
location ~ balloon title ~ balloon contents ~ Map Icon (wiki file) ~ Visited Map icon (wiki file) ~ label(shows next to pin at all times)~ something else?
location~balloon title~balloon contents~URL or image reference for pin icon~something else~label(shows next to pin at all times)~URL or image reference to visited pin
</pre>
</pre>


Full coding showing two pins, the first with a linked title and regular text with a persistent label and the second with no linked title but regular text and a small image:
I'm still trying to see how to do multiple lines of information in the balloon as we did with GoogleMaps.
<pre>
 
<display_map center="36.500667,-82.47797" type="terrain" zoom="15" width="715" height="350">
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:
36.50013,-82.47760~[[WPSP Sinking Waters|Sinking Waters]]~Here is the location of the trail head~MarkerA.png~ ~This is where Putin Works
<pre><display_map center="36.500667,-82.47797" type="terrain" zoom="15" width="715" height="350">
36.50013,-82.47760~[[WPSP Sinking Waters]]~Here is the location of the trail head;
36.502891,-82.468700~Connection~Intersection to/from [[WPSP_Fall_Creek_Loop_Trail|Fall Creek Loop]]<br>[[Image:To D Backbone Trail.jpg|150px|Trail head sign]]
36.502891,-82.468700~Connection~Intersection to/from [[WPSP_Fall_Creek_Loop_Trail|Fall Creek Loop]]<br>[[Image:To D Backbone Trail.jpg|150px|Trail head sign]]
</display_map>
</display_map>
Line 65: Line 64:


<display_map center="36.500667,-82.47797" type="terrain" zoom="15" width="715" height="350">
<display_map center="36.500667,-82.47797" type="terrain" zoom="15" width="715" height="350">
36.50013,-82.47760~[[WPSP Sinking Waters|Sinking Waters]]~Here is the location of the trail head~MarkerA.png~ ~This is where Putin Works
36.50013,-82.47760~[[WPSP Sinking Waters]]~Here is the location of the trail head;
36.502891,-82.468700~Connection~Intersection to/from [[WPSP_Fall_Creek_Loop_Trail|Fall Creek Loop]]<br>[[Image:To D Backbone Trail.jpg|150px|Trail head sign]]
36.502891,-82.468700~Connection~Intersection to/from [[WPSP_Fall_Creek_Loop_Trail|Fall Creek Loop]]<br>[[Image:To D Backbone Trail.jpg|150px|Trail head sign]]
</display_map>
</display_map>


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. Note that each pin must end with (;) except the last one


== 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. Custom icons are referenced using an image on the wiki without the "File:" prefix (e.g. MarkerA.png)
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 displat_map tag, using '''icon''':  
1. Add the icon address in quotes to the googlemap tag, using '''icon''':  
<pre><display_map icon=MarkerG.png>
<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
38.462857,-84.365461~Rick Grimes Shot
38.444857,-84.347461~Rick Grimes Shot
</display_map></pre>


<display_map icon=MarkerG.png>
Full coding example:
38.453857,-84.356461~Rick Grimes Shot
<nowiki><googlemap lat="36.072635" lon="-79.791975" icon="http://images.wikia.com/walkingdead/images/7/70/Markerfight.png"></nowiki>
38.462857,-84.365461~Rick Grimes Shot
38.453857, -84.356461, Rick Grimes Shot
38.444857,-84.347461~Rick Grimes Shot
<nowiki></googlemap></nowiki>
</display_map>


=== Custom icons ===
=== Custom icons ===
Custom icons are defined as the fourth of the pin parameters. This site has a list of custom icons that can be used. See the [[#Icons reference]] to know which letters will invoke which icon
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>
<display_map width="auto" height="350">
<googlemap lat="36.500667" lon="-82.47797"width="715" height="350" icons="http://tehcc.org/clubwiki/kml/marker{label}.png">
36.50013,-82.47760~Fall Creek Falls~[[Image:WPSP Fall Creek Falls.jpg|150px|Fall Creek Falls]]~MarkerE.png
(E) 36.50013,-82.47760
36.502632,-82.482759~Parking along Fall Creek Road~ ~MarkerA.png
Fall Creek Falls
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]]~MarkerG.png
[[Image:WPSP Fall Creek Falls.jpg|150px|Fall Creek Falls]]
</display_map>
(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>
<display_map width="auto" height="350">
36.50013,-82.47760~Fall Creek Falls~[[Image:WPSP Fall Creek Falls.jpg|150px|Fall Creek Falls]]~MarkerE.png
36.502632,-82.482759~Parking along Fall Creek Road~ ~MarkerA.png
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]]~MarkerG.png
</display_map>


==== 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"
!Filename
!Letter
!Icon
!Icon
!Meaning
!Meaning
!Name used in icon lists
|----
|----
|MarkerA.png
|A
|[[File:MarkerA.png]]
|http://tehcc.org/clubwiki/kml/markerA.png
|Parking
|Parking
|Parking
|----
|----
|MarkerB.png
|B
|[[File:MarkerB.png]]
|http://tehcc.org/clubwiki/kml/markerB.png
|Picturesque location
|Picturesque location
|Photo spot
|----
|----
|MarkerC.png
|C
|[[File:MarkerC.png]]
|http://tehcc.org/clubwiki/kml/markerC.png
|Waterfall
|Waterfall
|Waterfall
|----
|----
|MarkerD.png
|D
|[[File:MarkerD.png]]
|http://tehcc.org/clubwiki/kml/markerD.png
|Alternate for picturesque
|Alternate for picturesque
|Other photo spot
|----
|----
|MarkerE.png
|E
|[[File:MarkerE.png]]
|http://tehcc.org/clubwiki/kml/markerE.png
|Overlook
|Overlook
|Overlook
|----
|----
|MarkerF.png
|F
|[[File:MarkerF.png]]
|http://tehcc.org/clubwiki/kml/markerF.png
|Shelter
|Shelter
|Shelter
|----
|----
|MarkerG.png
|G
|[[File:MarkerG.png]]
|http://tehcc.org/clubwiki/kml/markerG.png
|Trailhead/intersection/point of interest
|Trailhead/intersection/point of interest
|Point of interest
|----
|----
|MarkerH.png
|H
|[[File:MarkerH.png]]
|http://tehcc.org/clubwiki/kml/markerH.png
|Campground
|Campground
|Campground
|----
|----
|MarkerI.png
|I
|[[File:MarkerI.png]]
|http://tehcc.org/clubwiki/kml/markerI.png
|Cave
|Cave
|Cave
|----
|----
|MarkerJ.png
|J
|[[File:MarkerJ.png]]
|http://tehcc.org/clubwiki/kml/markerJ.png
|Water crossing - no bridge - rock-hopping
|Water crossing - no bridge - rock-hopping
|Water crossing
|----
|----
|MarkerK.png
|K
|[[File:MarkerK.png]]
|http://tehcc.org/clubwiki/kml/markerK.png
|Bench
|Bench
|Bench
|----
|----
|MarkerL.png
|L
|[[File:MarkerL.png]]
|http://tehcc.org/clubwiki/kml/markerL.png
|Trail bridge
|Trail bridge
|Trail bridge
|----
|----
|MarkerM.png
|M
|[[File:MarkerM.png]]
|http://tehcc.org/clubwiki/kml/markerM.png
|Cell Tower/Antenna
|Cell Tower/Antenna
|Comm tower
|----
|----
|MarkerN.png
|N
|[[File:MarkerN.png]]
|http://tehcc.org/clubwiki/kml/markerN.png
|Cemetery
|Cemetery
|Cemetery
|----
|----
|MarkerO.png
|O
|[[File:MarkerO.png]]
|http://tehcc.org/clubwiki/kml/markerO.png
|Playground
|Playground
|Playground
|----
|----
|MarkerP.png
|Q
|[[File:MarkerP.png]]
|http://tehcc.org/clubwiki/kml/markerQ.png
|Summit Marker
|Summit
|----
|MarkerQ.png
|[[File:MarkerQ.png]]
|Toilet
|Toilet
|Toilet
|----
|----
|MarkerR.png
|R
|[[File:MarkerR.png]]
|http://tehcc.org/clubwiki/kml/markerR.png
|Tunnel
|Tunnel
|Tunnel
|----
|----
|MarkerS.png
|S
|[[File:MarkerS.png]]
|http://tehcc.org/clubwiki/kml/markerS.png
|Picnic Area
|Picnic Area
|Picnic spot
|----
|MarkerT.png
|[[File:MarkerT.png]]
|Trail intersection signpost
|Trail sign
|----
|MarkerU.png
|[[File:MarkerU.png]]
|Trail road crossing
|Road crossing
|----
|MarkerV.png
|[[File:MarkerV.png]]
|Old abandoned structure or foundation
|Old structure
|----
|MarkerW.png
|[[File:MarkerW.png]]
|Horseback riding
|Horseback
|----
|MarkerX.png
|[[File:MarkerX.png]]
|Alien capsule(?!)
|Alien landing
|----
|MarkerY.png
|[[File:MarkerY.png]]
|Rest spot
|Rest
|----
|Marker1.png
|[[File:Marker1.png]]
|Skiing
|Skiing
|----
|Marker2.png
|[[File:Marker2.png]]
|Tower (fire tower - It was the best that could be found)
|Tower
|----
|powerline.png
|[[File:powerline.png]]
|Power Line
|Power line
|----
|treedown.png
|[[File:treedown.png]]
|Blowdowns on trail
|Blowdown
|----
|Rangerstation.png
|[[File:Rangerstation.png]]
|Park ranger station, HQ, or visitor's center
|Rangerstation
|----
|----
|}
|}
The following sites have been useful for icons. The first are in the format typically used on this site for map pins. The second are shapes that can be made to appear like the first (for consistency)
Search http://mapicons.nicolasmollet.com/ for other icons to suggest, send to [mailto:webmaster@tehcc.org webmaster] for inclusion
*http://mapicons.nicolasmollet.com/
*https://www.iconsdb.com/


== 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
== Unexplored Features ==
Here's a list of new capabilities of the map extension that haven't been explored yet but sounds possibly useful for this site
* Drawing of lines, circles, and polygons on a map using coordinates within the tag - information [http://semantic-mediawiki.org/wiki/Maps_examples/Google_Maps_shapes here]
* Polygons on hover over a defined area - information [http://semantic-mediawiki.org/wiki/Maps_examples/Google_Maps_polygons_on_hover here]
* Searching within markers (although their examples don't seem to work - information [http://semantic-mediawiki.org/wiki/Maps_examples/Google_Maps_searchmarkers here]
* Fusion tables(???)
* [[Special:MapEditor|Map Editor]] to create lines, polygons, pin placements, etc.
* Dynamic tables and maps by searching created pages - See example [https://wiki.hackerspaces.org/Category:Pages_with_a_map_rendered_by_the_Maps_extension here] that maps and lists based on individual pages (I would really like this for both the master trails list and map but could also be a good way to handle parks with several trails)
Please note that all contributions to TEHCC Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see TEHCC Wiki:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)