85 | | You can add markers to the static map using the '`markers`' argument. The format is '`markers={latitude}:{longitude}:{size}{color}{alphanumeric-character}`', e.g.: `markers=50.805935:10.349121:bluea`, creates a blue marker labeled with 'A' at 50.805935,10.349121. |
86 | | Multiple marker declarations are separated using the '`|`' letter. |
| 87 | You can add markers to the static map using the '`markers`' argument. The format is '`markers=style settings|first location|next location|...`' |
| 88 | ([http://code.google.com/apis/maps/documentation/staticmaps/#Markers details]), |
| 89 | e.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. |
| 90 | The whole value must be quoted if any commas are included. Multiple `markers` arguments can be given to add markers with different styles. |
90 | | [[GoogleStaticMap(center=50.805935:10.349121,zoom=5,size=400x400,markers=50.805935:10.349121:bluea|50.000000:10.000000:greenb|49.046195:12.117577:yellowc)]] |
| 94 | [[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")]] |
94 | | [[Image(http://maps.google.com/staticmap?center=50.805935%2C10.349121&zoom=5&size=400x400&markers=50.805935%2c10.349121%2cbluea|50.000000%2c10.000000%2cgreenb|49.046195%2c12.117577%2cyellowc&key=ABQIAAAAMwTA9mkyZbDS6QMcxvwm2BQk7JAK84r7ycdvlw9atwcq_yt-SxQd58w7cbhU8Fvb5JRRi4sH8vpPEQ,nolink)]] |
| 98 | [[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)]] |
| 99 | |
| 100 | === Paths === |
| 101 | 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. |
| 102 | |
| 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 | This macro now also supports the so called ''wiki processor syntax'' (`{{{ <linebreak> #!Macro <linebreak> content <linebreak> }}}`) to allow for multiple lines of arguments. |
| 106 | In this case a line break will be read as a comma: |
| 107 | {{{ |
| 108 | {{{ |
| 109 | #!GoogleStaticMap |
| 110 | key1=value1 |
| 111 | key2="value 2, with comma" |
| 112 | key3=value3,key4=value4 |
| 113 | }}} |
| 114 | }}} |
| 115 | is identical to: |
| 116 | {{{ |
| 117 | [[GoogleStaticMap(key1=value1,key2="value 2, with comma",key3=value3,key4=value4)]] |
| 118 | }}} |
| 119 | |
| 120 | '''Example:''' |
| 121 | {{{ |
| 122 | {{{ |
| 123 | #!GoogleStaticMap |
| 124 | center="Germany" |
| 125 | path="Munich|Berlin|Cologne|Munich" |
| 126 | markers="label:M|Munich" |
| 127 | markers="label:B|Berlin" |
| 128 | markers="label:K|Cologne" |
| 129 | markers="label:H|color:orange|Hamburg|Hannover" |
| 130 | markers="size:small|color:green|Mannheim|Straubing|Münster" |
| 131 | size=250x300 |
| 132 | }}} |
| 133 | }}} |
| 134 | produces: |
| 135 | [[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)]] |