diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-02-29 12:31:45 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-02-29 12:31:45 +0000 |
commit | e771a1e5e04ae6f14928b1a328cca06c37f9af78 (patch) | |
tree | db25b499053c046a1a633a2b0e5bec5dd1362eba /perllib/FixMyStreet/Map.pm | |
parent | ee7168d35e11f64ecefb7093c04e323dace9722b (diff) |
Reduce JS pin fetching to only exactly the map that is shown.
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r-- | perllib/FixMyStreet/Map.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm index 2bccf1584..08bba3285 100644 --- a/perllib/FixMyStreet/Map.pm +++ b/perllib/FixMyStreet/Map.pm @@ -95,8 +95,10 @@ sub _map_features { my $around_limit = $c->cobrand->on_map_list_limit || undef; my @around_args = ( $min_lat, $max_lat, $min_lon, $max_lon, $interval ); - my $around_map_list = $c->cobrand->problems->around_map( @around_args, $around_limit ); my $around_map = $c->cobrand->problems->around_map( @around_args, undef ); + my $around_map_list = $around_limit + ? $c->cobrand->problems->around_map( @around_args, $around_limit ) + : $around_map; my $dist; mySociety::Locale::in_gb_locale { |