aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map/Tilma/Original.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-30 01:36:20 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-30 01:36:20 +0100
commit6db910f24b1c25bb32369fafde79cf0da83abed0 (patch)
tree05289e963270d6f56f1a962cee929dfa66e89bf1 /perllib/FixMyStreet/Map/Tilma/Original.pm
parent81c55de7598ff15f56de6341727ed46f7f9eed18 (diff)
Strategy/Format for updating pins as map is panned.
Diffstat (limited to 'perllib/FixMyStreet/Map/Tilma/Original.pm')
-rw-r--r--perllib/FixMyStreet/Map/Tilma/Original.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Map/Tilma/Original.pm b/perllib/FixMyStreet/Map/Tilma/Original.pm
index 6fa854cb2..0baa82011 100644
--- a/perllib/FixMyStreet/Map/Tilma/Original.pm
+++ b/perllib/FixMyStreet/Map/Tilma/Original.pm
@@ -96,7 +96,15 @@ sub display_pin {
}
sub map_pins {
- my ($self, $c, $x, $y, $sx, $sy, $interval) = @_;
+ my ($self, $c, $interval) = @_;
+
+ # Our current X/Y middle of visible map
+ my $x = ( $c->req->param('x') || 0 ) + 0;
+ my $y = ( $c->req->param('y') || 0 ) + 0;
+
+ # Where we started as that's the (0,0) we have to work to
+ my $sx = ( $c->req->param('sx') || 0 ) + 0;
+ my $sy = ( $c->req->param('sy') || 0 ) + 0;
my $e = tile_to_os($x);
my $n = tile_to_os($y);