aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/Around.pm6
-rwxr-xr-xperllib/FixMyStreet/App/Controller/Questionnaire.pm2
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm5
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/New.pm4
-rw-r--r--perllib/FixMyStreet/Map/OSM.pm7
-rw-r--r--perllib/FixMyStreet/Map/Tilma/Original.pm5
6 files changed, 12 insertions, 17 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm
index ac665055b..eef805da8 100644
--- a/perllib/FixMyStreet/App/Controller/Around.pm
+++ b/perllib/FixMyStreet/App/Controller/Around.pm
@@ -189,14 +189,14 @@ sub display_location : Private {
} } @$on_map_all, @$around_map;
{ # FIXME - ideally this indented code should be in the templates
- $c->stash->{map_html} = FixMyStreet::Map::display_map(
+ FixMyStreet::Map::display_map(
$c,
latitude => $latitude,
longitude => $longitude,
- type => 1,
+ clickable => 1,
pins => \@pins,
);
- $c->stash->{map_js} = FixMyStreet::Map::header_js();
+ $c->stash->{map_js} = FixMyStreet::Map::header_js();
}
return 1;
diff --git a/perllib/FixMyStreet/App/Controller/Questionnaire.pm b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
index f46b98510..ba714a736 100755
--- a/perllib/FixMyStreet/App/Controller/Questionnaire.pm
+++ b/perllib/FixMyStreet/App/Controller/Questionnaire.pm
@@ -256,7 +256,7 @@ sub display : Private {
);
$c->stash->{updates} = $updates;
- $c->stash->{map_start_html} = FixMyStreet::Map::display_map(
+ FixMyStreet::Map::display_map(
$c,
latitude => $problem->latitude,
longitude => $problem->longitude,
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index 82f553d71..82d83e318 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -150,11 +150,10 @@ sub generate_map_tags : Private {
my $problem = $c->stash->{problem};
- $c->stash->{map_start_html} = FixMyStreet::Map::display_map(
+ FixMyStreet::Map::display_map(
$c,
latitude => $problem->latitude,
longitude => $problem->longitude,
- type => 0,
pins => $problem->used_map
? [ {
latitude => $problem->latitude,
@@ -163,7 +162,7 @@ sub generate_map_tags : Private {
} ]
: [],
);
- $c->stash->{map_js} = FixMyStreet::Map::header_js();
+ $c->stash->{map_js} = FixMyStreet::Map::header_js();
return 1;
}
diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm
index 2bba93cd4..ba864eca4 100644
--- a/perllib/FixMyStreet/App/Controller/Report/New.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/New.pm
@@ -903,11 +903,11 @@ sub generate_map : Private {
# Don't do anything if the user skipped the map
unless ( $c->req->param('skipped') ) {
- $c->stash->{map_html} = FixMyStreet::Map::display_map(
+ FixMyStreet::Map::display_map(
$c,
latitude => $latitude,
longitude => $longitude,
- type => 1,
+ clickable => 1,
pins => [ {
latitude => $latitude,
longitude => $longitude,
diff --git a/perllib/FixMyStreet/Map/OSM.pm b/perllib/FixMyStreet/Map/OSM.pm
index aeece3960..194f403c9 100644
--- a/perllib/FixMyStreet/Map/OSM.pm
+++ b/perllib/FixMyStreet/Map/OSM.pm
@@ -35,7 +35,7 @@ sub copyright {
# display_map C PARAMS
# PARAMS include:
# latitude, longitude for the centre point of the map
-# TYPE is 1 if the map is clickable, 0 otherwise.
+# CLICKABLE is set if the map is clickable
# PINS is array of pins to show, location and colour
sub display_map {
my ($self, $c, %params) = @_;
@@ -64,10 +64,8 @@ sub display_map {
here => [ map { Utils::truncate_coordinate($_) } tile_to_latlon( $x_tile, $y_tile, $zoom_act ) ],
};
$c->stash->{map} = {
+ %params,
type => 'osm',
- clickable => $params{type},
- latitude => $params{latitude},
- longitude => $params{longitude},
map_type => $self->map_type(),
tile_url => $self->base_tile_url(),
copyright => $self->copyright(),
@@ -75,7 +73,6 @@ sub display_map {
y_tile => $y_tile,
zoom => $zoom,
zoom_act => $zoom_act,
- pins => $params{pins},
compass => $compass,
};
}
diff --git a/perllib/FixMyStreet/Map/Tilma/Original.pm b/perllib/FixMyStreet/Map/Tilma/Original.pm
index c7ff5a52f..f834c2d2a 100644
--- a/perllib/FixMyStreet/Map/Tilma/Original.pm
+++ b/perllib/FixMyStreet/Map/Tilma/Original.pm
@@ -36,7 +36,7 @@ sub header_js {
# display_map C PARAMS
# PARAMS include:
# latitude, longitude for the centre point of the map
-# TYPE is 1 if the map is clickable, 0 otherwise.
+# CLICKABLE is set if the map is clickable
# PINS is array of pins to show, location and colour
sub display_map {
my ($self, $c, %params) = @_;
@@ -72,10 +72,9 @@ sub display_map {
my $tiles = LWP::Simple::get($tiles_url);
my $tileids = RABX::unserialise($tiles);
$c->stash->{map} = {
+ %params,
type => 'tilma/original',
- pins => $params{pins},
tiles => $tiles,
- clickable => $params{type},
url => $url,
tileids => $tileids,
x => $x,