diff options
author | Dave Arter <davea@mysociety.org> | 2020-01-16 15:51:44 +0000 |
---|---|---|
committer | Dave Arter <davea@mysociety.org> | 2020-01-31 11:11:41 +0000 |
commit | 363cbb0ea0acf35a5bf56fcef6b3d60acc4f5fe7 (patch) | |
tree | f9aa7197a96e8d7a8411194975d9768ca708e8c3 /perllib/FixMyStreet/App/Controller/Report.pm | |
parent | c6992034cdbfdac30fb5704247585e294bba3566 (diff) |
Display inline map for duplicate suggestions on mobile
For #2668.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report.pm | 10 |
1 files changed, 8 insertions, 2 deletions
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 }; |