The Wiki for Tale 5 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 "Rogarian/GoogleMapsPageRewrite"

From ATITD5
Jump to navigationJump to search
Line 6: Line 6:
 
!Tale 5A Example
 
!Tale 5A Example
 
|-
 
|-
<pre>
+
|<pre>
 
<googlemap  
 
<googlemap  
 
  width=256
 
  width=256
 
  height=512
 
  height=512
scrollwheel=nothing
 
 
  showposition=yes
 
  showposition=yes
 
  showregion=yes
 
  showregion=yes
 
  lat=1010
 
  lat=1010
 
>
 
>
 +
0, 0, This Marker is at 0,0
 
</googlemap>
 
</googlemap>
 
</pre>
 
</pre>
Line 22: Line 22:
 
  width=256
 
  width=256
 
  height=512
 
  height=512
scrollwheel=nothing
 
 
  showposition=yes
 
  showposition=yes
 
  showregion=yes
 
  showregion=yes
 
  lat=1010
 
  lat=1010
 
>
 
>
 +
0, 0, This Marker is at 0,0
 
</googlemap>
 
</googlemap>
 
|}
 
|}

Revision as of 19:41, 15 September 2010

This wiki runs a modified version of the Google Maps extension for MediaWiki. It allows wiki users to create zoom-able, pan-able maps of Egypt with customized markers.

Tale 5A Example
<googlemap 
 width=256
 height=512
 showposition=yes
 showregion=yes
 lat=1010
>
0, 0, This Marker is at 0,0
</googlemap>


Tag Attributes

This extension defines a <googlemap> tag. Legal attributes are (boldface items are defaults):

Command Desc Options
tale Which Tale to display? Legal values: 1, 2, 3, 4 and 5.
cursor Which mouse cursor to use on the map? Legal values: default (standard mouse cursor), crosshair, pointer (hand).
width Width of the map in pixels. Defaults to 600 pixels.
height Height of the map in pixels. Defaults to 400 pixels.
lat The center latitude (x) on the map. Defaults to 1010.
lon The center longitude (y) on the map. Defaults to 0.
zoom Default zoom level. Game Map Legal values: 0 to 8 (1 is default, only the T5 map contains data on levels 7 and 8).
type The type of map to display. Game Maps: game - Shard A, gameb - Shard B

Normal Google Maps: normal (or, equivalently, map) - Normal Google Map, terrain, hybrid, and satellite.

controls Zoom and navigation controls. Legal values: 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.
showposition Show x,y coords under the mouse? Legal values: yes and no.
showregion Show the region name under of the mouse? Legal values: yes and no. Requires showpositions=yes; does not work in Tale 1, Tale 2 or Tale 3 maps.
icons URL template for custom markers. Use "{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 marker.png
doubleclick What to do when the user double-clicks? Legal values: recenter or zoom.
scrollwheel Define how the scroll wheel behaves. Legal values: nothing or zoom.
zoomstyle How does the map zoom? Legal values: fast and smooth, also known as continuous zooming (only works in some browsers).


Other Commands (Not useful for game maps):

Command Desc Options
stroke Width of paths, in pixels. Does not work in game maps.
scale Show the scale? Legal values are yes and no.
overview Show the inset navigation map? Legal values are yes and no.
selector Show the map/hybrid/satellite selector Legal values are yes and no.


All attributes are optional.

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 map here and a set of Mine Specific icons and Quarry Specificon the same page.

ATITD.org now hosts local copies of all the icons Mayanah has provided. Simply use: icons="/wiki/tale5/images/markers/marker{label}.png"

Click here to show all available markers: http://www.atitd.org/wiki/tale5/images/markers


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>

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.

Example Maps

Good Default Settings

<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>


Multiple Maps/Tales Examples

Tale 5 Shard A Tale 4 Shard B Tale 4 Shard A

tale=5
type=game
showposition=yes
showregion=yes
cursor=default
tale=4
type=gameb
showposition=yes
showregion=yes
cursor=crosshair
tale=4
type=game
showposition=yes
showregion=yes
cursor=pointer


Tale 3 Tale 2 Tale 1

tale=3
type=game
showposition=yes
tale=2
type=game
showposition=yes
tale=1
type=game
showposition=yes