| 1 | As of 0.52, OpenGuides supports Google Maps using the API. The support has a |
|---|
| 2 | few rough edges that still need ironing out, mostly relating to ellipsoids, |
|---|
| 3 | and for that reason they aren't exposed by default. |
|---|
| 4 | |
|---|
| 5 | To use Google Maps, you need to get an API key from |
|---|
| 6 | http://www.google.com/apis/maps/signup.html. When you've put this value into |
|---|
| 7 | the config file as gmaps_api_key, the maps become available to you in two |
|---|
| 8 | places. Firstly, if you've set "show_gmap_in_node_display", and if the user |
|---|
| 9 | has set their preferences to display Google Maps, any node which has |
|---|
| 10 | location information will get an inset map pinpointing the location. |
|---|
| 11 | Secondly, the URL |
|---|
| 12 | http://.../wiki.cgi?action=index;format=map becomes a large map with a list |
|---|
| 13 | of all nodes (regardless of the user settings). The latter will become very |
|---|
| 14 | slow on any sizable guide (there is work being done on speeding up indexes |
|---|
| 15 | in general - please see the mailing list). If you don't get maps displayed |
|---|
| 16 | when you know that the node has location information, read on. |
|---|
| 17 | |
|---|
| 18 | Ellipsoids and map accuracy |
|---|
| 19 | --------------------------- |
|---|
| 20 | |
|---|
| 21 | If you are based in the US and inputting points using latitude/longitude, |
|---|
| 22 | the values in your database will almost certainly correspond to points on |
|---|
| 23 | Google Maps. If so, simply change the "ellipsoid" configuration variable |
|---|
| 24 | to "WGS-84" if it's not already set to this, and your maps will display. |
|---|
| 25 | |
|---|
| 26 | If you are using the British Grid system things are more complicated. |
|---|
| 27 | To display accurate maps, you need to have the optional perl module |
|---|
| 28 | Geo::HelmertTransform installed (libgeo-helmerttransform-perl in Debian). |
|---|
| 29 | If this isn't possible, you can still get Google Maps to display by setting |
|---|
| 30 | the configuration variable force_wgs84 to 1, but points will be offset from |
|---|
| 31 | where they should be, normally by about 50 metres. This is because the |
|---|
| 32 | British Grid uses a different ellipsoid from Google Maps. This is not |
|---|
| 33 | recommended; if you do so, you must make users aware of the flaw and tell |
|---|
| 34 | them not to try and "correct" location data! |
|---|
| 35 | |
|---|
| 36 | You may be unlucky enough to be using the UTM input modes (ie not British |
|---|
| 37 | or Irish National Grid) but have data entered in a mixture of formats. |
|---|
| 38 | This is likely if your users are from the UK, as you may find a mixture of |
|---|
| 39 | WGS-84 and Airy (ie British Grid style) based nodes. In this case, you |
|---|
| 40 | *do* need to correct any that are offset. Only do this if your users |
|---|
| 41 | input Lat/long values rather than grid Eastings/Northings. |
|---|