From c56f704e998b418aa3f11d5e3b6b86d6c7ce40e6 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Wed, 9 Mar 2011 22:21:04 +0000 Subject: Fixes to other map types to work with lat/lon. Split OSM JavaScript into core OpenLayers bits and OSM config bit. --- perllib/FixMyStreet/Map/OSM/StreetView.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'perllib/FixMyStreet/Map/OSM/StreetView.pm') diff --git a/perllib/FixMyStreet/Map/OSM/StreetView.pm b/perllib/FixMyStreet/Map/OSM/StreetView.pm index 08f677d25..c0c2a8504 100644 --- a/perllib/FixMyStreet/Map/OSM/StreetView.pm +++ b/perllib/FixMyStreet/Map/OSM/StreetView.pm @@ -14,8 +14,8 @@ use mySociety::Web qw(ent); sub header_js { return ' + - '; } @@ -31,16 +31,23 @@ sub display_map { $params{pre} ||= ''; $params{post} ||= ''; + my @pins; foreach my $pin (@{$params{pins}}) { + $pin->[3] ||= ''; + push @pins, "[ $pin->[0], $pin->[1], '$pin->[2]', '$pin->[3]' ]"; } + my $pins_js = join(",\n", @pins); my $out = FixMyStreet::Map::header($q, $params{type}); my $copyright = _('Map contains Ordnance Survey data © Crown copyright and database right 2010.'); $out .= < +
-- cgit v1.2.3