The Wiki for Tale 4 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.
If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.
Difference between revisions of "Google Maps"
(48 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
− | <googlemap lat="42.711618" lon="-73.205112" zoom="2" controls="small" | + | <googlemap lat="0" lon="0" zoom="2" controls="medium" type="gameb" scrollwheel="zoom" icon="http://labs.google.com/ridefinder/images/mm_20_red.png"> |
− | 42.711618,-73.205112,the | + | |
+ | (T) 1000, 1000, Test marker at 1000 1000 | ||
+ | (H) 4361, -668, Home | ||
+ | </googlemap> | ||
+ | |||
+ | == Tag Attributes == | ||
+ | |||
+ | This extension defines a <nowiki><googlemap></nowiki> tag. Legal attributes are: | ||
+ | |||
+ | * <code>width</code> of the map (in pixels; defaults to 450) | ||
+ | * <code>height</code> of the map (in pixels; defaults to 300) | ||
+ | * <code>lat</code> (the center latitude on the map, defaults to my old dorm room :-) | ||
+ | * <code>lon</code> (the center longitude on the map) | ||
+ | * <code>zoom</code> (the zoom level; 0 is the furthest away, 17 is the closest in, maximum for game maps is 6) | ||
+ | * <code>type</code> (legal values are ''game'' (for atitd map original shard), ''gameb'' (for atitd map Bastet shard), ''normal'' (or, equivalently, ''map''), ''terrain'' ('''new in 0.9.0'''), ''hybrid'', and ''satellite''; defaults to ''game'') | ||
+ | * '''Note: Only one type of map be used on a page. You can not have both the original shard and Bastet shard maps on the same page.''' | ||
+ | * <code>controls</code> (''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) | ||
+ | * <code>selector</code> (show the map/hybrid/satellite selector? Legal values are ''yes'' and ''no'' (default).) | ||
+ | * <code>scale</code> (show the distance scale? Legal values are ''yes'' and ''no'' (default).) | ||
+ | * <code>overview</code> (show the inset navigation map? Legal values are ''yes'' and ''no'' (default).) | ||
+ | * <code>icons</code> (URL template for custom markers, with "{label}" where the name of the icon will be inserted; defaults to "<nowiki>http://maps.google.com/mapfiles/marker{label}.png</nowiki>") | ||
+ | * <code>icon</code> (URL for markers without an icon specified; defaults to http://maps.google.com/mapfiles/marker.png) | ||
+ | * <code>doubleclick</code> (what to do when the user double-clicks? legal values are ''recenter'' (default) and ''zoom'') | ||
+ | * <code>zoomstyle</code> (legal values are ''fast'' and ''smooth'' (default), also known as continuous zooming; only works in some browsers) | ||
+ | * <code>stroke</code> (width of paths, in pixels) | ||
+ | * <code>scrollwheel</code> (define scroll wheel behavior; ''nothing'' or ''zoom'' (default)) | ||
+ | |||
+ | All attributes are optional. | ||
+ | |||
+ | == A note about icons == | ||
+ | |||
+ | You can host your own collection of icons on your server, but note that they'll have the same anchor points as Google's default icon. Check out [http://mapki.com/wiki/Icon_Image_Sets Mapki's collection of icon images] for a bunch of icons you can use. To use your icons, add an icon attribute to your googlemap-tags like this | ||
+ | |||
+ | <nowiki><googlemap lat="42.711618" lon="-73.205112" zoom="2" controls="small" | ||
+ | icon="http://myserver.com/standardmarker.png" | ||
+ | icons="http://myserver.com/markers/marker{label}.png"></nowiki> | ||
+ | |||
+ | [[User:Mayanah|Mayanah]] has some instructions for using an alternate set of icons [[User:Mayanah/map|here]] and a set of [[User:Mayanah/map#Mine_Specific|Mine Specific]] icons on the same page. | ||
+ | |||
+ | The [[Dowsing Map]] page has a set of icons for labeling metal veins. | ||
+ | |||
+ | == Markers == | ||
+ | |||
+ | In the content of the tag, you can define one marker per line. Each line may or may not start with an icon name in parentheses; unless you set the "icons" attribute, legal icon names are the upper-case letters of the alphabet. The line should then have the latitude, then a comma, optionally a space, then the longitude, then a comma, then a label for the point. The label can include wiki mark-up (and commas). These are all legal: | ||
+ | |||
+ | <nowiki><googlemap lat="42.711618" lon="-73.205112" zoom="2" controls="small"> | ||
+ | 42.711618,-73.205112,here goes the title | ||
+ | 42.711618, -73.205112, here goes the title, it can contains commas too but not wiki markup | ||
+ | (S) 42.711618, -73.205112, here goes the title | ||
+ | first line of the caption | ||
+ | Second line of the caption, not that the caption can contain wiki markup like [[Resources]] | ||
+ | </googlemap></nowiki> | ||
+ | |||
+ | == Paths == | ||
+ | |||
+ | To connect multiple points with a colored path, prefix them with a line that begins with the color in RGB hex format., e.g. | ||
+ | |||
+ | <nowiki> | ||
+ | 6#FF330000 | ||
+ | 42.711618,-73.205112 | ||
+ | 42.714779,-73.204544 | ||
+ | </nowiki> | ||
+ | |||
+ | That will connect the two points with a colored line. Any points not on a line should appear before all points on lines. For example: | ||
+ | |||
+ | 42.711618, -73.25112, this point is not on a line | ||
+ | 43.224024, -70.28301, neither is this one | ||
+ | 6#FF770077 | ||
+ | 42.202452, -72.83101, this is on a line of color #77077 | ||
+ | 45.214425, -72.48114, so is this | ||
+ | 6#FF668800 | ||
+ | 42.201324, -70.95811, this starts a second line | ||
+ | 43.404142, -73.44514, this is also on the second line | ||
+ | |||
+ | Any text on the same line as, but appearing after, the color specification will be ignored. | ||
+ | |||
+ | == Areas == | ||
+ | |||
+ | Areas are enclosed paths with a colored filling. The syntax is just like a path, except that the interior color should be specified in parentheses after the path color, like this: | ||
+ | |||
+ | 6#770077 (#BB668800) | ||
+ | |||
+ | == Color Specification == | ||
+ | |||
+ | The color specification includes '''opacity''' and '''stroke''' information, e.g. | ||
+ | |||
+ | <nowiki>6#FF330000</nowiki> | ||
+ | |||
+ | The ''6'' means that the path will be 6 pixels wide. The first two hex digits specify the opacity from #00 (transparent) to #FF (opaque). The final 6 hex digits are a "web color", i.e. #RRGGBB. In the example above the opacity is #FF and the color is #330000. | ||
+ | |||
+ | Similarly for areas, the interior color should be 8 digits instead of 6; the first two digits define the opacity, e.g. | ||
+ | |||
+ | 6#770077 (#BB668800) | ||
+ | |||
+ | == Tabbed Info Balloons == | ||
+ | |||
+ | Each tab should have a plain-text title surrounded by inward-leaning slashes (like /this\) followed by a caption that can include wiki mark-up. Tabs will be attached to the previous marker. Example: | ||
+ | |||
+ | <nowiki> | ||
+ | 45.214425, -72.48114 | ||
+ | /Info\ | ||
+ | This is where Ulysses Grant is buried | ||
+ | /Directions\ | ||
+ | [http://maps.google.com Click here] to get driving directions | ||
+ | Or just drive in a random direction | ||
+ | </nowiki> | ||
+ | |||
+ | That will create a point whose info balloon has two tabs. Note that you can put as much or as little space as you'd like between the title and the caption to make the syntax more readable. | ||
+ | |||
+ | If a point has a regular caption ''and'' tabbed captions, clicking the point will only show the tabbed captions. | ||
+ | |||
+ | ==Good Default Settings== | ||
+ | ===All of Egypt, No Borders=== | ||
+ | <googlemap lat=1010 lon=0 zoom=1 width=256 height=512> | ||
+ | </googlemap> | ||
+ | ===All of Egypt, Square=== | ||
+ | <googlemap lat=1010 lon=0 zoom=1 width=512 height=512> | ||
+ | </googlemap> | ||
+ | |||
+ | ---- | ||
+ | |||
+ | And a real map of egypt: | ||
+ | <googlemap lat="29.980624" lon="31.134653" zoom="14" controls="medium" type="hybrid" selector="yes"> | ||
+ | 29.980624, 31.134653, PYRAMIDS | ||
</googlemap> | </googlemap> |
Latest revision as of 20:58, 9 September 2010
Tag Attributes
This extension defines a <googlemap> tag. Legal attributes are:
width
of the map (in pixels; defaults to 450)height
of the map (in pixels; defaults to 300)lat
(the center latitude on the map, defaults to my old dorm room :-)lon
(the center longitude on the map)zoom
(the zoom level; 0 is the furthest away, 17 is the closest in, maximum for game maps is 6)type
(legal values are game (for atitd map original shard), gameb (for atitd map Bastet shard), normal (or, equivalently, map), terrain (new in 0.9.0), hybrid, and satellite; defaults to game)- Note: Only one type of map be used on a page. You can not have both the original shard and Bastet shard maps on the same page.
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? Legal values are yes and no (default).)scale
(show the distance scale? Legal values are yes and no (default).)overview
(show the inset navigation map? Legal values are yes and no (default).)icons
(URL template for custom markers, with "{label}" where the name of the icon will be inserted; defaults to "http://maps.google.com/mapfiles/marker{label}.png")icon
(URL for markers without an icon specified; defaults to )doubleclick
(what to do when the user double-clicks? legal values are recenter (default) and zoom)zoomstyle
(legal values are fast and smooth (default), also known as continuous zooming; only works in some browsers)stroke
(width of paths, in pixels)scrollwheel
(define scroll wheel behavior; nothing or zoom (default))
All attributes are optional.
A note about icons
You can host your own collection of icons on your server, but note that they'll have the same anchor points as Google's default icon. Check out Mapki's collection of icon images for a bunch of icons you can use. To use your icons, add an icon attribute to your googlemap-tags like this
<googlemap lat="42.711618" lon="-73.205112" zoom="2" controls="small" icon="http://myserver.com/standardmarker.png" icons="http://myserver.com/markers/marker{label}.png">
Mayanah has some instructions for using an alternate set of icons here and a set of Mine Specific icons on the same page.
The Dowsing Map page has a set of icons for labeling metal veins.
Markers
In the content of the tag, you can define one marker per line. Each line may or may not start with an icon name in parentheses; unless you set the "icons" attribute, legal icon names are the upper-case letters of the alphabet. The line should then have the latitude, then a comma, optionally a space, then the longitude, then a comma, then a label for the point. The label can include wiki mark-up (and commas). These are all legal:
<googlemap lat="42.711618" lon="-73.205112" zoom="2" controls="small"> 42.711618,-73.205112,here goes the title 42.711618, -73.205112, here goes the title, it can contains commas too but not wiki markup (S) 42.711618, -73.205112, here goes the title first line of the caption Second line of the caption, not that the caption can contain wiki markup like [[Resources]] </googlemap>
Paths
To connect multiple points with a colored path, prefix them with a line that begins with the color in RGB hex format., e.g.
6#FF330000 42.711618,-73.205112 42.714779,-73.204544
That will connect the two points with a colored line. Any points not on a line should appear before all points on lines. For example:
42.711618, -73.25112, this point is not on a line 43.224024, -70.28301, neither is this one 6#FF770077 42.202452, -72.83101, this is on a line of color #77077 45.214425, -72.48114, so is this 6#FF668800 42.201324, -70.95811, this starts a second line 43.404142, -73.44514, this is also on the second line
Any text on the same line as, but appearing after, the color specification will be ignored.
Areas
Areas are enclosed paths with a colored filling. The syntax is just like a path, except that the interior color should be specified in parentheses after the path color, like this:
6#770077 (#BB668800)
Color Specification
The color specification includes opacity and stroke information, e.g.
6#FF330000
The 6 means that the path will be 6 pixels wide. The first two hex digits specify the opacity from #00 (transparent) to #FF (opaque). The final 6 hex digits are a "web color", i.e. #RRGGBB. In the example above the opacity is #FF and the color is #330000.
Similarly for areas, the interior color should be 8 digits instead of 6; the first two digits define the opacity, e.g.
6#770077 (#BB668800)
Tabbed Info Balloons
Each tab should have a plain-text title surrounded by inward-leaning slashes (like /this\) followed by a caption that can include wiki mark-up. Tabs will be attached to the previous marker. Example:
45.214425, -72.48114 /Info\ This is where Ulysses Grant is buried /Directions\ [http://maps.google.com Click here] to get driving directions Or just drive in a random direction
That will create a point whose info balloon has two tabs. Note that you can put as much or as little space as you'd like between the title and the caption to make the syntax more readable.
If a point has a regular caption and tabbed captions, clicking the point will only show the tabbed captions.
Good Default Settings
All of Egypt, No Borders
All of Egypt, Square
And a real map of egypt: