source: trunk/README.GMAPS

Last change on this file was 1336, checked in by kake, 10 years ago

Added support for using Leaflet instead of the Google Maps API.

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