Author: dom Date: 2006-02-22 22:10:50 +0000 (Wed, 22 Feb 2006) New Revision: 736
Added: trunk/README.GMAPS Modified: trunk/INSTALL trunk/README trunk/lib/OpenGuides.pm trunk/lib/OpenGuides/Config.pm Log: More Google Maps tweaks.
Modified: trunk/INSTALL =================================================================== --- trunk/INSTALL 2006-02-21 23:28:00 UTC (rev 735) +++ trunk/INSTALL 2006-02-22 22:10:50 UTC (rev 736) @@ -201,7 +201,7 @@ If you want Google Maps integration, you need to register with Google to get an API key. Visit http://www.google.com/apis/maps/signup.html and follow the instructions. Paste the great long string into the console window where you -are installing. +are installing. See README.GMAPS for more information.
"What is the longitude of the centre point of a map to draw for your guide?" "What is the latitude of the centre point of a map to draw for your guide?" @@ -249,6 +249,9 @@ National Grid, Geography::NationalGrid::IE to use the Irish National Grid, and Geo::Coordinates::UTM to use a UTM ellipsoid.
+If you want to use a UTM ellipsoid, WGS-84 is the best choice, as it +will allow you to use the Google Maps support with the minimum of fuss. + * Dependency errors
If, after you have answered these questions, the build script complains
Modified: trunk/README =================================================================== --- trunk/README 2006-02-21 23:28:00 UTC (rev 735) +++ trunk/README 2006-02-22 22:10:50 UTC (rev 736) @@ -13,6 +13,8 @@
BUGS AND CAVEATS UTF8 data are currently not handled correctly throughout. + Google Maps points will display offset when using British and Irish + National Grid input systems.
Other bugs are documented at http://dev.openguides.org/ @@ -35,7 +37,7 @@ The OpenGuides Project (openguides-dev@openguides.org)
COPYRIGHT - Copyright (C) 2003-2005 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2003-2006 The OpenGuides Project. All Rights Reserved.
The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Added: trunk/README.GMAPS =================================================================== --- trunk/README.GMAPS 2006-02-21 23:28:00 UTC (rev 735) +++ trunk/README.GMAPS 2006-02-22 22:10:50 UTC (rev 736) @@ -0,0 +1,39 @@ +As of 0.52, OpenGuides supports Google Maps using the API. The support has a +few rough edges that still need ironing out, mostly relating to ellipsoids, +and for that reason they aren't exposed by default. + +To use Google Maps, you need to get an API key from +http://www.google.com/apis/maps/signup.html. When you've put this value into +the config file as gmaps_api_key, the maps become available to you in two +places. Firstly, if the user has set the user preference to display Google +Maps, any node which has location information will get an inset map +pinpointing the location. Secondly, the URL +http://.../wiki.cgi?action=index;format=map becomes a large map with a list +of all nodes (regardless of the user settings). The latter will become very +slow on any sizable guide (there is work being done on speeding up indexes +in general - please see the mailing list). If you don't get maps displayed +when you know that the node has location information, read on. + +Ellipsoids and map accuracy +--------------------------- + +If you are based in the US and inputting points using latitude/longitude, +the values in your database will almost certainly correspond to points on +Google Maps. If so, simply change the "ellipsoid" configuration variable +to "WGS-84" if it's not already set to this, and your maps will display. + +If you are using the British Grid system things are more complicated and this +support is incomplete. If you set the configuration variable force_wgs84 +to 1, maps will display, but points will be offset from where they should +be, normally by about 50 metres. This is because the British Grid uses a +different ellipsoid from Google Maps. We plan to integrate conversion +routines to fix this in a future release. In the meantime, if you +advertise the maps you must make users aware of this flaw and tell them +not to try and "correct" location data! + +You may be unlucky enough to be using the UTM input modes (ie not British +or Irish National Grid) but have data entered in a mixture of formats. +This is likely if your users are from the UK, as you may find a mixture of +WGS-84 and Airy (ie British Grid style) based nodes. In this case, you +*do* need to correct any that are offset. Only do this if your users +input Lat/long values rather than grid Eastings/Northings.
Modified: trunk/lib/OpenGuides/Config.pm =================================================================== --- trunk/lib/OpenGuides/Config.pm 2006-02-21 23:28:00 UTC (rev 735) +++ trunk/lib/OpenGuides/Config.pm 2006-02-22 22:10:50 UTC (rev 736) @@ -77,7 +77,7 @@ formatting_rules_link => "http://openguides.org/page/text_formatting", backlinks_in_title => 0, geo_handler => 1, - ellipsoid => "International", + ellipsoid => "WGS-84", centre_long => 0, centre_lat => 0, default_gmaps_zoom => 5, @@ -232,7 +232,7 @@
=item * geo_handler (default: C<1>)
-=item * ellipsoid (default: C<International>) +=item * ellipsoid (default: C<WGS-84>)
=item * gmaps_api_key
@@ -254,7 +254,7 @@
=head1 COPYRIGHT
- Copyright (C) 2004-2005 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2004-2006 The OpenGuides Project. All Rights Reserved.
The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Modified: trunk/lib/OpenGuides.pm =================================================================== --- trunk/lib/OpenGuides.pm 2006-02-21 23:28:00 UTC (rev 735) +++ trunk/lib/OpenGuides.pm 2006-02-22 22:10:50 UTC (rev 736) @@ -985,7 +985,7 @@
=head1 COPYRIGHT
- Copyright (C) 2003-2005 The OpenGuides Project. All Rights Reserved. + Copyright (C) 2003-2006 The OpenGuides Project. All Rights Reserved.
The OpenGuides distribution is free software; you can redistribute it and/or modify it under the same terms as Perl itself.