Changes between Version 24 and Version 25 of GoogleMapMacro


Ignore:
Timestamp:
Oct 30, 2008, 12:15:00 AM (15 years ago)
Author:
Martin Scharrer
Comment:

Added description for target argument and updated page for new argument parser format (commas are now allowed in double quotes).

Legend:

Unmodified
Added
Removed
Modified
  • GoogleMapMacro

    v24 v25  
    5959## Possible settings are 'server' or 'client' (without the quotes). Default is 'client' in order not to change the DB unasked.
    6060#geocoding = server
    61 ## Optional default settings:
     61## Optional default settings, e.g:
    6262#default_size = 400x400
    6363#default_zoom = 6
     64#default_target = newwindow
    6465}}}
    6566
    6667== Usage ==
    67 The macro knows the following arguments, which can be used in the normal `key1=value1,key2=value2,...` syntax.
    68 If a key-less value is given it will be taken as `center` coordinates if it's in the proper format ({float}:{float}) otherwise it's taken as an `address`.
     68The macro knows the following arguments, which can be used in the normal `key1=value1,key2=value2,...` syntax. If a value includes one or more comma then it must be set in double quotes (`" "`).
     69If a key-less value is given it will be taken as `center` coordinates if it's in the proper format otherwise it's taken as an `address`. Unknown (or misspelled) keys or key-less values except the first are silently ignored.
    6970
    70  `address`:: Sets the center of the map to the given address. Please use semi-colons ('`;`') to separate the street, city and country. The value can be surrounded by quotes, e.g. `"Street; City; Country"`.
     71 `address`:: Sets the center of the map to the given address. The value must be surrounded by quotes if it includes commas, e.g. `"Street, City, Country"`.
    7172             If an `address` but no `zoom` value was given an appropriate value will be guessed based on the address accuracy returned by Google.
    7273             At the moment this isn't very accurate but soon [http://groups.google.com/group/Google-Maps-API/browse_thread/thread/53c4525e8d01e75d Google might improve] this.
    73  `center`:: Sets the center of the map to the given coordinates. The format is `{latitude,longitude}`.
     74 `center`:: Sets the center of the map to the given coordinates. The format is `{latitude}:{longitude}` or `"{latitude},{longitude}"`.
    7475 `zoom`:: Sets zoom factor. Allowed values are between 0 (whole world) and 19 (single house). Very high zoom values might not be supported by Google Maps for all parts of the world.
    7576 `size`:: The size either in the format `{width}x{height}` as numbers in pixel, e.g.: `300x400` means 300px wide and 400px high or
     
    9495    If the string 'center' is used instead of an address the center of the map is marked.
    9596    The optional marker letter can be either A-Z or 'o', '.' or empty for a plain marker.
    96     An optional [TracLinks TracLink] can be given which will be opened in a new window when clicked on the marker.
     97    An optional [TracLinks TracLink] can be given which may be opened in a new window (see `target`) when clicked on the marker.
    9798    An optional marker title can be set which will get displayed when the mouse cursor is over the marker.
    9899    Multiple markers are separated using the '`|`' character. Optional values can be kept empty, e.g.: `"{Address}";;;My Address` would display the address with the title 'My Address'.
    99     Trailing semicolons can be skipped as long there are no semicolons in the address, in this case just add enough: `"My Address; City; State; Country";;;`. This will be fixed in future releases.
     100    Trailing semicolons can be skipped. Addresses, links and titles which include either '`,`', '`;`' or '`|`' must be enclosed in double quotes (`" "`).
     101 `target`:: If set to '`new`' or '`newwindow`' all hyperlinks of the map markers will be opened in a new window (or tab, depending on the browser settings) or in the same window otherwise.
    100102
    101103
     
    115117Please use semicolons, not commas, as separators in the address.
    116118{{{
    117 [[GoogleMap(address="Street; City; Country",zoom=10,size=400x400)]]
     119[[GoogleMap(address="Street, City, Country",zoom=10,size=400x400)]]
    118120or
    119 [[GoogleMap("Street; City; Country",zoom=10,size=400x400)]]
     121[[GoogleMap("Street, City, Country",zoom=10,size=400x400)]]
    120122or, if you really want to:
    121 [[GoogleMap(Street; City; Country,zoom=10,size=400x400)]]
     123[[GoogleMap(Street, City, Country,zoom=10,size=400x400)]]
    122124}}}
    123125Please note that the address is converted into coordinates by user-side javascript every time the wiki page is loaded.
     
    132134            resolved by the client-side !JavaScript code.
    133135{{{
    134 [[GoogleMap(center=50.0:10.0,address="Street; City; Country",zoom=10,size=400x400)]]
     136[[GoogleMap(center=50.0:10.0,address="Street, City, Country",zoom=10,size=400x400)]]
    135137}}}
    136138
     
    139141To show a map with the standard map types where the satellite map is preselected:
    140142{{{
    141 [[GoogleMap("Street; City; Country",zoom=10,size=400x400,type=satellite)]]
     143[[GoogleMap("Street, City, Country",zoom=10,size=400x400,type=satellite)]]
    142144}}}
    143145
    144146To only show a satellite map (please note the added '`s`'):
    145147{{{
    146 [[GoogleMap("Street; City; Country",zoom=10,size=400x400,types=satellite)]]
     148[[GoogleMap("Street, City, Country",zoom=10,size=400x400,types=satellite)]]
    147149}}}
    148150
    149151To show a map with hybrid and satellite map types (in this order) where the satellite map is preselected:
    150152{{{
    151 [[GoogleMap("Street; City; Country",zoom=10,size=400x400,types=hybrid:satellite,type=satellite)]]
     153[[GoogleMap("Street, City, Country",zoom=10,size=400x400,types=hybrid:satellite,type=satellite)]]
    152154}}}
    153155
    154156To show a map with hybrid and satellite map types (in this order) where the hybrid map is preselected:
    155157{{{
    156 [[GoogleMap("Street; City; Country",zoom=10,size=400x400,types=hybrid:satellite)]]
     158[[GoogleMap("Street, City, Country",zoom=10,size=400x400,types=hybrid:satellite)]]
    157159or
    158 [[GoogleMap("Street; City; Country",zoom=10,size=400x400,types=hybrid:satellite,type=hybrid)]]
     160[[GoogleMap("Street, City, Country",zoom=10,size=400x400,types=hybrid:satellite,type=hybrid)]]
    159161}}}
    160162
     
    162164To create three markers: one at the center of the map (A), one at the next street (B) and one at coordinates 10.243,23.343 (C):
    163165{{{
    164 [[GoogleMap("Street; City; Country",zoom=10,size=400x400,markers=center;A|"Next street; City; Country";B|10.243:23.343;C)]]
     166[[GoogleMap("Street, City, Country",zoom=10,size=400x400,markers=center;A|"Next street, City, Country";B|10.243:23.343;C)]]
    165167}}}
    166168The same with hyperlinked markers:
    167169{{{
    168 [[GoogleMap("Street; City; Country",zoom=10,size=400x400,markers=center;A;wiki:MyWikiPage|"Next street; City; Country";B;ticket:1|10.243:23.343;C;http://www.example.com/)]]
     170[[GoogleMap("Street, City, Country",zoom=10,size=400x400,markers=center;A;wiki:MyWikiPage|"Next street, City, Country";B;ticket:1|10.243:23.343;C;http://www.example.com/)]]
    169171}}}
    170172