Changes between Version 22 and Version 23 of GoogleStaticMapMacro


Ignore:
Timestamp:
Aug 24, 2015, 1:03:28 PM (9 years ago)
Author:
figaro
Comment:

Updated code.google links

Legend:

Unmodified
Added
Removed
Modified
  • GoogleStaticMapMacro

    v22 v23  
    11[[PageOutline(2-5,Contents,pullout)]]
    22
    3 = Insert a static Google Map as image
     3= Insert a static Google Map as an image
    44
    55== Description
    66
    7 This macro uses the [http://code.google.com/apis/maps/documentation/staticmaps/ Google Map API] to include '''static''' images of maps.
     7This macro uses the [https://developers.google.com/maps/documentation/staticmaps/intro?csw=1&safe=on Google Map API] to include '''static''' images of maps.
    88'''Static''' means that is is only a simple image without any user interaction and not the usual feature-rich dynamic map on http://maps.google.com/. No Javascript is needed to display the map image.
    99
     
    2121
    2222If you have any issues, create a
    23 [http://trac-hacks.org/newticket?component=GoogleStaticMapMacro&owner=martin_s new ticket].
     23[/newticket?component=GoogleStaticMapMacro new ticket].
    2424
    2525[[TicketQuery(component=GoogleStaticMapMacro&group=type,format=progress)]]
     
    3737Install the plugin [http://trac-hacks.org/#HowdoIinstallthesethings as usual].
    3838
    39 To enable the macro put the following into your `trac.ini` file, which is located in the `config` directory of your trac installation.
    40 You need to restart Trac to reread the macro file and the configuration file.
     39To enable the macro put the following into your `trac.ini` file, which is located in the `config` directory of your Trac installation:
    4140
    4241{{{#!ini
     
    5251}}}
    5352
     53You need to restart Trac to reread the macro file and the configuration file.
     54
    5455== Upgrade from older Versions ==#Upgrade
    5556
    56 The current version of the macro uses the [http://code.google.com/apis/maps/documentation/staticmaps/ Google Static Map API v2], while older versions used [http://code.google.com/apis/maps/documentation/staticmaps/v1/ API v1]
    57 ([http://code.google.com/apis/maps/documentation/staticmaps/upgrade.html Upgrade guide]).
     57The current version of the macro uses the Google Static Map API v2, while older versions used API v1. To upgrade see
     58[https://developers.google.com/maps/documentation/staticmaps/upgrade?csw=1&safe=on here].
    5859The syntax provided by Google has changed between the API versions. To provide the newer features without breaking existing macros, both API versions are supported using the `api` key.
    5960The older syntax can still be used with newer versions of the macro by setting `api=1` either as a macro argument (`[[GoogleStaticMap(api=1,<old syntax>)]]`) or using the global [#config configuration] option `default_api_version`.
    6061
    61 Please note, that since v2 an API key is not required anymore by Google. The API v1 still requires a trac server specific Google Map API key which is [http://code.google.com/apis/maps/signup.html provided by Google for free].
     62Please note, that since v2 an API key is not required anymore by Google. The API v1 still requires a Trac server specific Google Map API key which is [https://developers.google.com/maps/signup?csw=1&safe=on provided by Google for free].
    6263
    6364== Usage & Examples
     
    6768=== Parameters
    6869
    69 The macro accepts the official [http://code.google.com/apis/maps/documentation/staticmaps/#URL_Parameters Google Static Map argument (see there)] as well as a few internal arguments:
     70The macro accepts the official [https://developers.google.com/maps/documentation/staticmaps/intro?csw=1&safe=on Google Static Map argument] as well as a few internal arguments:
    7071 title:: Sets the HTML title of the map image.
    71  api:: Sets the API version to be used. By default set to "`2`". To reuse the older macros set `api=1` as mentioned earlier.
     72 api:: Sets the API version to be used. By default set to "`2`". To reuse the older macros, set `api=1` as mentioned earlier.
    7273 key:: Sets the API key if not set globally in the config file. Deprecated for macro v1.x / Google API v2.
    7374
     
    8788
    8889You can add markers to the static map using the '`markers`' argument. The format is '`markers=style settings|first location|next location|...`'
    89 ([http://code.google.com/apis/maps/documentation/staticmaps/#Markers details]),
     90([https://developers.google.com/maps/documentation/staticmaps/intro?csw=1&safe=on]),
    9091e.g.: `markers="size:mid|label:A|color:blue|50.805935,10.349121"`, creates a blue marker labeled with 'A' at 50.805935,10.349121. Again also addresses can be used to specify locations.
    9192The whole value must be quoted if any commas are included. Multiple `markers` arguments can be given to add markers with different styles.
    9293
    93 So,
     94So the following example:
    9495{{{
    9596[[GoogleStaticMap(center="50.805935,10.349121",zoom=5,size=400x400,markers="color:blue|label:A|50.805935,10.349121",markers="color:green|label:B|50.000000,10.000000|Berlin,Germany",markers="color:yellow|label:C|Regensburg,Germany")]]
    9697}}}
     98
    9799will result in the following map image:
    98100
     
    101103=== Paths
    102104
    103 Paths between locations can be added using the `path` argument which has basically the same syntax as `markers`, except different styles are supported. See [http://code.google.com/apis/maps/documentation/staticmaps/#Paths the Google documentation] for details.
     105Paths between locations can be added using the `path` argument which has basically the same syntax as `markers`, except different styles are supported. See [https://developers.google.com/maps/documentation/staticmaps/intro?csw=1&safe=on the Google documentation] for details.
    104106
    105107== Processor Syntax
     
    107109While Tracs normal macro syntax (`[[Macro(key=value,key=value)]]`) is nice for smaller arguments lists, it is getting messy for longer lists.
    108110This macro now also supports the so called ''wiki processor syntax'' (`{{{ <linebreak> #!Macro <linebreak> content <linebreak> }}}`) to allow for multiple lines of arguments.
     111
    109112In this case a line break will be read as a comma:
    110113{{{
     
    116119}}}
    117120}}}
     121
    118122is identical to:
    119123{{{