Changeset 886
Legend:
- Unmodified
- Added
- Removed
-
trunk/Build.PL
r882 r886 73 73 my $install_directory; # used to suggest template paths 74 74 my $use_plucene = 1; # keep track of this so we know what to put in prereqs 75 my $centre_lat = ''; # contains centre lat derived from Google Maps URL 75 76 foreach my $var ( qw( 76 77 dbname dbuser dbpass dbhost script_name … … 128 129 } 129 130 131 # If a Google Maps URL was provided last time we know the centre_lat 132 if ( $var eq 'centre_lat' && $centre_lat ) { 133 $val = $centre_lat; 134 next; 135 } 136 130 137 # Here is where we actually ask the questions. 131 138 unless ( $skip_config ) { … … 138 145 } else { 139 146 $val = Module::Build->prompt("\n$qu ", $def); 147 } 148 } 149 150 # Allow user to use a Google Maps URL rather than enter lat/long by hand. 151 # We assume centre_long is being asked for first; ensure so in big list above. 152 if ( $var eq 'centre_long' ) { 153 if ( $val =~ /ll=([-\d.]+),([-\d.]+)/ ) { 154 print "Got a Google Maps URL with centre long,lat: [$1, $2]\n"; 155 $val = $1; 156 $centre_lat = $2; 140 157 } 141 158 } -
trunk/INSTALL
r845 r886 205 205 "What is the latitude of the centre point of a map to draw for your guide?" 206 206 207 It's probably a good idea to pick some notionally central point for your 208 guide. For example, Carfax for Oxford, Charing Cross for London. 207 It's probably a good idea to pick some notionally central point for your 208 guide. For example, Carfax for Oxford, Charing Cross for London. As a 209 convenience, you may paste in a Google Maps URL for the centre longitude 210 question and the (long,lat) will be parsed out from the URL. 209 211 210 212 "What default zoom level shall we use for Google Maps?" -
trunk/lib/OpenGuides/Config.pm
r874 r886 160 160 ellipsoid => "Which ellipsoid do you want to use? (eg 'Airy', 'WGS-84')", 161 161 gmaps_api_key => "Do you have a Google Maps API key to use with this guide? If you enter it here the Google Maps functionality will be automatically enabled.", 162 centre_long => "What is the longitude of the centre point of a map to draw for your guide? (This question can be ignored if you aren't using Google Maps) ",162 centre_long => "What is the longitude of the centre point of a map to draw for your guide? (This question can be ignored if you aren't using Google Maps). You may paste in a Google Maps URL here (hint: copy URL from 'Link to this page')", 163 163 centre_lat => "What is the latitude of the centre point of a map to draw for your guide? (This question can be ignored if you aren't using Google Maps)", 164 164 default_gmaps_zoom => "What default zoom level shall we use for Google Maps? (This question can be ignored if you aren't using Google Maps)",
