Changes between Version 14 and Version 15 of GoogleMapMacro
- Timestamp:
- Oct 28, 2008, 3:02:41 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GoogleMapMacro
v14 v15 34 34 35 35 36 == Installation & Configuration == 36 == Installation & Configuration ==#config 37 37 38 38 Just copy the [http://trac-hacks.org/browser/googlemapmacro/0.11/googlemap.py?format=raw python file] in the `plugin` directory of your trac installation. 39 39 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].40 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. 41 41 42 To enable the macro put the following into your `trac.ini` file, which is located in the `config` directory of your trac installation. 42 To enable the macro put the below text into your `trac.ini` file, which is located in the `config` directory of your trac installation. 43 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. 44 Google recommends server side geocoding with caching which is now implemented and can be enabled using `geocoding = server`. 45 Please note that this creates a table 'googlemapmacro' in your trac database which is used for the caching. 46 Server side geocoding is recommended but disabled by default. 47 43 48 You need to restart trac to reread the macro file and the configuration file. 44 49 … … 49 54 [googlemap] 50 55 api_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 51 60 ## Optional default settings: 52 61 #default_size = 400x400 … … 101 110 102 111 === 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. 112 If 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. 104 116 {{{ 105 117 [[GoogleMap(center=50.0:10.0,address="Street; City; County",zoom=10,size=400x400)]] 106 118 }}} 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.109 119 110 120