Changes between Version 21 and Version 22 of GoogleStaticMapMacro


Ignore:
Timestamp:
Apr 16, 2015, 11:37:45 AM (3 years ago)
Author:
figaro
Comment:

Cosmetic changes, tagged with license

Legend:

Unmodified
Added
Removed
Modified
  • GoogleStaticMapMacro

    v21 v22  
    1 [[TOC]]
    2 = Insert a static Google Map as image =
     1[[PageOutline(2-5,Contents,pullout)]]
    32
    4 == Description ==
     3= Insert a static Google Map as image
     4
     5== Description
    56
    67This macro uses the [http://code.google.com/apis/maps/documentation/staticmaps/ Google Map API] to include '''static''' images of maps.
    7 '''Static''' means that is is only a simple image without any user interaction not the usual feature-rich dynamic map on http://maps.google.com/. The positive side is that no javascript is needed to display the map image.
     8'''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.
    89
    910For a dynamic Google map use the GoogleMapMacro.
    1011
    11 Please note that the maximum size supported by Google is 640x640 pixels. If a bigger width or height is requested it will be reduced to 640px.
     12Please note that the maximum size supported by Google is 640x640 pixels. If a bigger width or height is requested, it will be reduced to 640px.
    1213
    1314The macro should work both with Trac 0.11 and 0.12. At the moment there is only a 0.11 directory which can also be used for Trac 0.12.
    1415The AdvParseArgsPlugin is used to allow for quoted argument values and must also be installed.
    1516
    16 
    17 
    18 == Bugs/Feature Requests ==
     17== Bugs/Feature Requests
    1918
    2019Existing bugs and feature requests for GoogleStaticMapMacro are
     
    2423[http://trac-hacks.org/newticket?component=GoogleStaticMapMacro&owner=martin_s new ticket].
    2524
    26 == Download ==
     25[[TicketQuery(component=GoogleStaticMapMacro&group=type,format=progress)]]
     26
     27== Download
    2728
    2829Download the macro as [download:googlestaticmapmacro/0.11 ZIP-file].
    2930
    30 
    31 == Source ==
     31== Source
    3232
    3333You can check out GoogleStaticMapMacro from [http://trac-hacks.org/svn/googlestaticmapmacro here] using Subversion, or [source:googlestaticmapmacro browse the source] with Trac.
    34 
    3534
    3635== Installation & Configuration ==#config
     
    3938
    4039To enable the macro put the following into your `trac.ini` file, which is located in the `config` directory of your trac installation.
    41 You need to restart trac to reread the macro file and the configuration file.
     40You need to restart Trac to reread the macro file and the configuration file.
    4241
    43 {{{
     42{{{#!ini
    4443[components]
    4544tracgooglestaticmap.* = enabled
     
    5453
    5554== Upgrade from older Versions ==#Upgrade
     55
    5656The 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]
    5757([http://code.google.com/apis/maps/documentation/staticmaps/upgrade.html Upgrade guide]).
    58 The syntax provided by Google has changed between the API versions. In order to provide the newer features but also not break existing macros both API versions are supported using the `api` key.
     58The 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.
    5959The 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`.
    6060
    6161Please 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].
    6262
     63== Usage & Examples
    6364
    64 == Usage & Examples ==
    6565This documentation describes the syntax for the macro v1.x which uses Google's API v2 (see [#Upgrade]). The older syntax is still supported using the `api=1` argument. See [./GoogleStaticMapMacro?version=18 an older version] of this wiki page for the old syntax. Mixing of older and newer syntax is not supported.
    6666
    67 === Parameters ===
     67=== Parameters
     68
    6869The 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:
    6970 title:: Sets the HTML title of the map image.
     
    8384[[Image(http://maps.google.com/staticmap?center=50.805935%2C10.349121&zoom=5&size=400x400,nolink)]]
    8485
     86=== Markers
    8587
    86 === Markers ===
    8788You can add markers to the static map using the '`markers`' argument. The format is '`markers=style settings|first location|next location|...`'
    8889([http://code.google.com/apis/maps/documentation/staticmaps/#Markers details]),
     
    9899[[Image(http://maps.google.com/maps/api/staticmap?center=50.805935%2C10.349121&zoom=5&markers=color%3Ablue%7Clabel%3AA%7C50.805935%2C10.349121&markers=color%3Agreen%7Clabel%3AB%7C50.000000%2C10.000000%7CBerlin%2CGermany&markers=color%3Ayellow%7Clabel%3AC%7CRegensburg%2CGermany&hl=en&sensor=false&size=400x400,nolink)]]
    99100
    100 === Paths ===
     101=== Paths
     102
    101103Paths 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.
    102104
    103 == Processor Syntax ==
    104 While Tracs normal macro syntax (`[[Macro(key=value,key=value)]]`) is nice for smaller arguments lists it is getting messy for longer lists.
     105== Processor Syntax
     106
     107While Tracs normal macro syntax (`[[Macro(key=value,key=value)]]`) is nice for smaller arguments lists, it is getting messy for longer lists.
    105108This macro now also supports the so called ''wiki processor syntax'' (`{{{ <linebreak> #!Macro <linebreak> content <linebreak> }}}`) to allow for multiple lines of arguments.
    106109In this case a line break will be read as a comma:
     
    137140[[Image(http://maps.google.com/maps/api/staticmap?center=Germany&markers=label%3AM%7CMunich&markers=label%3AB%7CBerlin&markers=label%3AK%7CCologne&markers=label%3AH%7Ccolor%3Aorange%7CHamburg%7CHannover&markers=size%3Asmall%7Ccolor%3Agreen%7CMannheim%7CStraubing%7CM%C3%BCnster&hl=en&path=Munich%7CBerlin%7CCologne%7CMunich&sensor=false&size=250x300,nolink)]]
    138141
    139 
    140 == Recent Changes ==
     142== Recent Changes
    141143
    142144[[ChangeLog(googlestaticmapmacro, 3)]]
    143145
    144 == Author/Contributors ==
     146== Author/Contributors
    145147
    146148'''Author:''' [wiki:martin_s] [[BR]]
    147 '''Maintainer:''' [wiki:martin_s] [[BR]]
     149'''Maintainer:''' [[Maintainer]] [[BR]]
    148150'''Contributors:'''