Changes between Version 14 and Version 15 of GoogleMapMacro


Ignore:
Timestamp:
Oct 28, 2008, 4:02:41 PM (6 years ago)
Author:
martin_s
Comment:

Added usage description for server side geocoding

Legend:

Unmodified
Added
Removed
Modified
  • GoogleMapMacro

    v14 v15  
    3434
    3535
    36 == Installation & Configuration ==
     36== Installation & Configuration ==#config
    3737
    3838Just copy the [http://trac-hacks.org/browser/googlemapmacro/0.11/googlemap.py?format=raw python file] in the `plugin` directory of your trac installation.
    3939
    40 A different Google Map API key is needed for every web domain which can be [http://code.google.com/apis/maps/signup.html get for free from Google].
     40A 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.
    4141
    42 To enable the macro put the following into your `trac.ini` file, which is located in the `config` directory of your trac installation.
     42To enable the macro put the below text into your `trac.ini` file, which is located in the `config` directory of your trac installation.
     43You 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.
     44Google recommends server side geocoding with caching which is now implemented and can be enabled using `geocoding = server`.
     45Please note that this creates a table 'googlemapmacro' in your trac database which is used for the caching.
     46Server side geocoding is recommended but disabled by default.
     47
    4348You need to restart trac to reread the macro file and the configuration file.
    4449
     
    4954[googlemap]
    5055api_key = <Your Google API key (long hex number)>
     56## Server side geocoding (address-to-coordinates conversion) incl. caching (recommended).
     57## Please note that this creates a table 'googlemapmacro' in your trac database.
     58## Possible settings are 'server' or 'client' (without the quotes). Default is 'client' in order not to change the DB unasked.
     59#geocoding = server
    5160## Optional default settings:
    5261#default_size = 400x400
     
    101110
    102111=== Using both ===
    103 Doesn't make this much sense, but is supported anyway. This could be used as failsafe if you aren't sure if the address resolution will be successful.
     112If both address and center coordinates are given, then the result depends on the [#config `geocoding` setting]:
     113 `server`:: The address is resolved on the trac server and the coordinates are completely ignored.
     114 `client`:: The map is first centered at the given coordinates and then moved to the given address after (and if) it was
     115            resolved by the client-side JavaScript code.
    104116{{{
    105117[[GoogleMap(center=50.0:10.0,address="Street; City; County",zoom=10,size=400x400)]]
    106118}}}
    107 The given coordinates will be shown until the address is resolved, which can take a little when the user has a slow internet connection.
    108 After (and if) the address is resolved the map will be centered on it.
    109119
    110120