aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map/OSM/StreetView.pm
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-05-25 16:43:40 +0100
committerStruan Donald <struan@exo.org.uk>2011-05-25 16:43:40 +0100
commitd974cc0258d26a366262bce7b456d39b0c71a40b (patch)
tree03534cbf86dcf83a36df3839ff49e70cbf458b5b /perllib/FixMyStreet/Map/OSM/StreetView.pm
parent6a679dbe9f0d7021f176ca23106a74bc2475539e (diff)
parentc5ace4f09cb6a31942a4be688f883ca141ca6649 (diff)
Merge branch 'migrate_to_catalyst' of ssh://git.mysociety.org/data/git/public/fixmystreet into migrate_to_catalyst
Diffstat (limited to 'perllib/FixMyStreet/Map/OSM/StreetView.pm')
-rw-r--r--perllib/FixMyStreet/Map/OSM/StreetView.pm40
1 files changed, 9 insertions, 31 deletions
diff --git a/perllib/FixMyStreet/Map/OSM/StreetView.pm b/perllib/FixMyStreet/Map/OSM/StreetView.pm
index 9512e2013..ba7134c1e 100644
--- a/perllib/FixMyStreet/Map/OSM/StreetView.pm
+++ b/perllib/FixMyStreet/Map/OSM/StreetView.pm
@@ -7,9 +7,9 @@
# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/
package FixMyStreet::Map::OSM::StreetView;
+use base 'FixMyStreet::Map::OSM';
use strict;
-use mySociety::Web qw(ent);
sub header_js {
return '
@@ -19,38 +19,16 @@ 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.
-# PINS is array of pins to show, location and colour
-sub display_map {
- my ($self, $c, %params) = @_;
- $params{pre} ||= '';
-
- 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);
+sub map_type {
+ return '""';
+}
- my $out = '';
- my $copyright = _('Map contains Ordnance Survey data &copy; Crown copyright and database right 2010.');
- $out .= <<EOF;
-<script type="text/javascript">
-var fixmystreet = {
- 'latitude': $params{latitude},
- 'longitude': $params{longitude},
- 'pins': [ $pins_js ]
+sub base_tile_url {
+ return 'os.openstreetmap.org/sv';
}
-</script>
-<div id="map_box">
- $params{pre}
- <div id="map"></div>
- <p id="copyright">$copyright</p>
-EOF
- return $out;
+
+sub copyright {
+ return _('Map contains Ordnance Survey data &copy; Crown copyright and database right 2010.');
}
1;