From 363cbb0ea0acf35a5bf56fcef6b3d60acc4f5fe7 Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Thu, 16 Jan 2020 15:51:44 +0000 Subject: Display inline map for duplicate suggestions on mobile For #2668. --- perllib/FixMyStreet/App/Controller/Report.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'perllib/FixMyStreet/App/Controller/Report.pm') diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm index 9cc810c16..7dfda1a4c 100644 --- a/perllib/FixMyStreet/App/Controller/Report.pm +++ b/perllib/FixMyStreet/App/Controller/Report.pm @@ -590,7 +590,13 @@ sub inspect : Private { sub map :Chained('id') :Args(0) { my ($self, $c) = @_; - my $image = $c->stash->{problem}->static_map; + my %params; + if ( $c->get_param('inline_duplicate') ) { + $params{full_size} = 1; + $params{zoom} = 5; + } + + my $image = $c->stash->{problem}->static_map(%params); $c->res->content_type($image->{content_type}); $c->res->body($image->{data}); } @@ -639,7 +645,7 @@ sub _nearby_json :Private { my $list_html = $c->render_fragment( 'report/nearby.html', - { reports => $nearby } + { reports => $nearby, inline_maps => $c->get_param("inline_maps") ? 1 : 0 } ); my $json = { pins => \@pins }; -- cgit v1.2.3