diff options
-rw-r--r-- | perllib/Cobrands/Barnet/Util.pm | 15 | ||||
-rw-r--r-- | perllib/Page.pm | 6 | ||||
-rw-r--r-- | templates/website/cobrands/barnet/barnet-header | 4 |
3 files changed, 20 insertions, 5 deletions
diff --git a/perllib/Cobrands/Barnet/Util.pm b/perllib/Cobrands/Barnet/Util.pm index f91e100e6..9e837fd74 100644 --- a/perllib/Cobrands/Barnet/Util.pm +++ b/perllib/Cobrands/Barnet/Util.pm @@ -7,7 +7,7 @@ # Copyright (c) 2009 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org. WWW: http://www.mysociety.org # -# $Id: Util.pm,v 1.5 2009-12-22 11:21:04 matthew Exp $ +# $Id: Util.pm,v 1.6 2009-12-22 11:44:46 matthew Exp $ package Cobrands::Barnet::Util; use Standard; @@ -88,5 +88,18 @@ sub all_councils_report { return 0; } +=item disambiguate_location S Q + +Given a string representing a location (street and area expected), +bias the viewport to around Barnet. + +=cut + +sub disambiguate_location { + my ($self, $s, $q) = @_; + $s = "ll=51.612832,-0.218169&spn=0.0563,0.09&$s"; + return $s; +} + 1; diff --git a/perllib/Page.pm b/perllib/Page.pm index cab731faa..16ddfa1c9 100644 --- a/perllib/Page.pm +++ b/perllib/Page.pm @@ -6,7 +6,7 @@ # Copyright (c) 2006 UK Citizens Online Democracy. All rights reserved. # Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: Page.pm,v 1.226 2009-12-15 16:53:54 matthew Exp $ +# $Id: Page.pm,v 1.227 2009-12-22 11:44:45 matthew Exp $ # package Page; @@ -966,9 +966,9 @@ sub geocode_string { $s =~ s/[^-&0-9a-z ']/ /g; $s =~ s/\s+/ /g; $s = uri_escape($s); - $s = Cobrand::disambiguate_location(get_cobrand($q), $s, $q); + $s = Cobrand::disambiguate_location(get_cobrand($q), "q=$s", $q); $s =~ s/%20/+/g; - my $url = 'http://maps.google.com/maps/geo?q=' . $s; + my $url = 'http://maps.google.com/maps/geo?' . $s; my $cache_dir = mySociety::Config::get('GEO_CACHE'); my $cache_file = $cache_dir . md5_hex($url); my ($js, $error, $x, $y, $easting, $northing); diff --git a/templates/website/cobrands/barnet/barnet-header b/templates/website/cobrands/barnet/barnet-header index e3de9583d..3474091e6 100644 --- a/templates/website/cobrands/barnet/barnet-header +++ b/templates/website/cobrands/barnet/barnet-header @@ -70,8 +70,10 @@ <form action="http://www.barnet.gov.uk/search">
<div class="search-input">
+ <input type="hidden" name="col" value="lbb">
+ <input type="hidden" name="type" value="sitesearch">
<label for="input-0" class="rm">Search:</label>
- <input type="text" value="Please enter your search" class="search">
+ <input type="text" value="Please enter your search" name="search" class="search">
</div>
<div class="search-button">
<input type="submit" value="Search" class="submit" id="input-0">
|