Changes between Version 45 and Version 46 of GoogleMapMacro


Ignore:
Timestamp:
Apr 16, 2015, 11:47:13 AM (9 years ago)
Author:
figaro
Comment:

Cosmetic changes, tagged with license

Legend:

Unmodified
Added
Removed
Modified
  • GoogleMapMacro

    v45 v46  
    11[[PageOutline(2-5,Contents,pullout)]]
    2 = Insert a dynamic Google Map into wiki pages =
     2
     3= Insert a dynamic Google Map into wiki pages
    34
    45{{{
     
    89}}}
    910
    10 == Description ==
     11== Description
    1112
    1213This macro lets the user insert a full dynamic [http://maps.google.com/ Google Map]. Because a lot of javascript is used (by Google) a [http://local.google.com/support/bin/answer.py?answer=16532&topic=1499 Google Map compatible browser] is needed. Newer version of Firefox and MS Internet Explorer are compatible.
     
    2324The AdvParseArgsPlugin is used to allow for quoted argument values and must also be installed.
    2425
    25 == Dependencies ==
     26== Dependencies
     27
    2628The recent version ([4801]) of this macro needs the AdvParseArgsPlugin in revision [4795] or later.
    2729
    28 == Bugs/Feature Requests ==
     30== Bugs/Feature Requests
    2931
    3032Existing bugs and feature requests for GoogleMapMacro are
     
    3436[http://trac-hacks.org/newticket?component=GoogleMapMacro&owner=martin_s&release=0.11 new ticket].
    3537
    36 == Download ==
     38[[TicketQuery(component=GoogleMapMacro&group=type,format=progress)]]
     39
     40== !ToDo/Planned
     41
     42 * Implement some error handling for driving directions.
     43 * Default values in config file for all arguments.
     44 * Maybe merge source with GoogleStaticMapMacro to allow addresses there, too.
     45 * Argument `static=yes` to render a static map while using GoogleMapMacro format.
     46
     47== Download
    3748
    3849Download the zipped source from [download:googlemapmacro here].
    3950
    40 == Source ==
     51== Source
    4152
    4253You can check out GoogleMapMacro from [http://trac-hacks.org/svn/googlemapmacro/0.11 here] using Subversion, or [source:googlemapmacro/0.11 browse the source] with Trac.
    4354
    44 There is a develop version which can be unstable: [http://trac-hacks.org/svn/googlemapmacro/dev/0.11 check-out] | [source:googlemapmacro/dev/0.11 browse]
    45 
    46 
    47 == Installation ==
    48 
    49 This macro is now provided as python package.
    50 If you have installed an older single-file version of the macro please remove it from the `plugins` directory and note the different component name (see below).
     55There is a develop version which can be unstable: [http://trac-hacks.org/svn/googlemapmacro/dev/0.11 check-out].
     56
     57== Installation
     58
     59This macro is now provided as a Python package.
     60If you have installed an older single-file version of the macro, please remove it from the `plugins` directory and note the different component name (see below).
    5161
    5262== Configuration ==#config
    5363
    54 A different [http://code.google.com/apis/maps/signup.html Google Map API key] is needed for every web domain which can be get for free from Google.
    55 '''Please check if the Google Map API Terms of Use apply for your Trac project.''' They do apply IMHO for non-pay open accessible Trac projects.
    56 
    57 To enable the macro put the below text into your `trac.ini` file, which is located in the `config` directory of your trac installation.
    58 You can define project wide default values for some arguments and also whether the geocoding (address-to-coordinates conversion) is done on by the trac server or by the clients web browser.
     64A different [http://code.google.com/apis/maps/signup.html Google Map API key] is needed for every web domain which can be obtained for free from Google.
     65'''Please check if the Google Map API Terms of Use apply for your Trac project.''' They apply to free and openly accessible Trac projects.
     66
     67To enable the macro put the below text into your `trac.ini` file, which is located in the `config` directory of your Trac installation.
     68You can define project wide default values for some arguments and also whether the geocoding (address-to-coordinates conversion) is done on by the Trac server or by the client's web browser.
    5969Google recommends server side geocoding with caching which is now implemented and can be enabled using `geocoding = server`.
    60 Please note that this creates a table `googlemapmacro` in your trac database which is used for the caching.
     70Please note that this creates a table `googlemapmacro` in your Trac database which is used for the caching.
    6171Server side geocoding is recommended but disabled by default.
    6272
    63 You need to restart trac to reread the macro file and the configuration file. If you select server side geocoding you also need to update the Trac database using `trac-admin `''<trac path>''` upgrade`.
    64 
    65 {{{
     73You need to restart Trac to reread the macro file and the configuration file. If you select server side geocoding you also need to update the Trac database using `trac-admin `''<trac path>''` upgrade`.
     74
     75{{{#!ini
    6676[components]
    6777tracgooglemap.* = enabled
     
    7989}}}
    8090
    81 == Usage ==
     91== Usage
     92
    8293The 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 (`" "`).
    8394If 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.
     
    8798             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.
    8899 `center`:: Sets the center of the map to the given coordinates. The format is `{latitude}:{longitude}` or `"{latitude},{longitude}"`.
    89  `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.
    90  `size`:: The size either in the format `{width}x{height}` as numbers in pixel, e.g.: `300x400` means 300px wide and 400px high or
     100 `zoom`:: Sets zoom factor. Allowed values are between 0 (whole world) and 19 (single house). High zoom values might not be supported by Google Maps for all parts of the world.
     101 `size`:: The size either in the format `{width}x{height}` as numbers in pixel: `300x400` means 300px wide and 400px high or
    91102          in the format `{width}{unit}:{height}{unit}` where unit can be any CSS unit (em, ex, px, in, cm, mm, pt, pc).
    92103 `types` (optional):: Sets the map types selectable by the user, separated by colons ('`:`'). If not given the standard types of Google Maps are used (Normal, Satellite, Hybrid). The following types are available (values are case-insensitive):
     
    118129 `from`,`to`:: Request driving directions '`from`'->'`to`'. Multiple `to` addresses are allowed. No `address` or `center` need to be given.
    119130
    120 == Processor Syntax ==
     131== Processor Syntax
     132
    121133While Tracs normal macro syntax (`[[Macro(key=value,key=value)]]`) is nice for smaller arguments lists it is getting messy for longer lists.
    122134This macro now also supports the so called ''wiki processor syntax'' (`{{{ <linebreak> #!Macro <linebreak> content <linebreak> }}}`) to allow for multiple lines of arguments.
     
    135147}}}
    136148
    137 == Examples ==
    138 
    139 === Using geographic coordinates ===
    140 Please use a colon, not a comma, as separator for the coordinates.
     149== Examples
     150
     151=== Using geographic coordinates
     152
     153Please use a colon, not a comma, as separator for the coordinates:
    141154{{{
    142155[[GoogleMap(center=50.0:10.0,zoom=10,size=400x400)]]
     
    146159[[GoogleMap(50.0:10.0,zoom=10,size=400x400)]]
    147160}}}
    148 === Using an address ===
    149 Please use semicolons, not commas, as separators in the address.
     161
     162=== Using an address
     163
     164Please use semicolons, not commas, as separators in the address:
    150165{{{
    151166[[GoogleMap(address="Street, City, Country",zoom=10,size=400x400)]]
     
    155170[[GoogleMap(Street; City; Country,zoom=10,size=400x400)]]
    156171}}}
    157 Please note that the address is converted into coordinates by user-side javascript every time the wiki page is loaded.
    158 If this fails no map will be shown, only an empty gray rectangle.
     172Please note that the address is converted into coordinates by user-side Javascript every time the wiki page is loaded.
     173If this fails, then no map will be shown, only an empty gray rectangle.
    159174
    160175Server side address conversion including caching is underway.
    161176
    162 === Using both ===
     177=== Using both geographic coordinates and addresses
     178
    163179If both address and center coordinates are given, then the result depends on the [#config `geocoding` setting]:
    164180 `server`:: The address is resolved on the trac server and the coordinates are completely ignored.
     
    169185}}}
    170186
    171 
    172 === Select Map Types ===
     187=== Select Map Types
     188
    173189To show a map with the standard map types where the satellite map is preselected:
    174190{{{
     
    193209}}}
    194210
    195 === Markers ===
     211=== Markers
     212
    196213To 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):
    197214{{{
     
    203220}}}
    204221
    205 == Recent Changes in the Release Branch ==
     222== Recent Changes
    206223
    207224[[ChangeLog(googlemapmacro/0.11, 3)]]
    208225
    209 == Author/Contributors ==
     226== Author/Contributors
    210227
    211228'''Author:''' [wiki:martin_s] [[BR]]
    212 '''Maintainer:''' [wiki:martin_s] [[BR]]
     229'''Maintainer:''' [[Maintainer]] [[BR]]
    213230'''Contributors:'''
    214 
    215 == !ToDo/Planned ==
    216  * Implement some error handling for driving directions.
    217  * Default values in config file for all arguments.
    218  * Maybe merge source with GoogleStaticMapMacro to allow addresses there, too.
    219  * Argument `static=yes` to render a static map while using GoogleMapMacro format.