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/CycleMap.pm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'perllib/FixMyStreet/Map/OSM/CycleMap.pm') diff --git a/perllib/FixMyStreet/Map/OSM/CycleMap.pm b/perllib/FixMyStreet/Map/OSM/CycleMap.pm index 87884d459..0a6e216c8 100644 --- a/perllib/FixMyStreet/Map/OSM/CycleMap.pm +++ b/perllib/FixMyStreet/Map/OSM/CycleMap.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 © OpenStreetMap and contributors, CC-BY-SA'); $out .= < + -- cgit v1.2.3