diff options
Diffstat (limited to 'perllib/FixMyStreet/Map')
-rw-r--r-- | perllib/FixMyStreet/Map/Bing.pm | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/Bristol.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/Bromley.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/GoogleOL.pm | 8 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/OSM.pm | 8 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/OSM/CycleMap.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/OSM/MapQuest.pm | 8 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/OSM/StreetView.pm | 8 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/WMTSBase.pm | 6 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/Zurich.pm | 4 |
10 files changed, 15 insertions, 42 deletions
diff --git a/perllib/FixMyStreet/Map/Bing.pm b/perllib/FixMyStreet/Map/Bing.pm index 4c1887641..617823b45 100644 --- a/perllib/FixMyStreet/Map/Bing.pm +++ b/perllib/FixMyStreet/Map/Bing.pm @@ -6,8 +6,7 @@ use base 'FixMyStreet::Map::OSM'; use strict; -# Is set by the JavaScript -sub map_type { '""' } +sub map_type { '' } sub map_template { 'bing' } diff --git a/perllib/FixMyStreet/Map/Bristol.pm b/perllib/FixMyStreet/Map/Bristol.pm index 3b60d1acf..c2925ff8d 100644 --- a/perllib/FixMyStreet/Map/Bristol.pm +++ b/perllib/FixMyStreet/Map/Bristol.pm @@ -60,9 +60,7 @@ sub copyright { return '© BCC'; } -sub map_type { - return 'bristol'; -} +sub map_template { 'bristol' } # Reproject a WGS84 lat/lon into BNG easting/northing sub reproject_from_latlon($$$) { diff --git a/perllib/FixMyStreet/Map/Bromley.pm b/perllib/FixMyStreet/Map/Bromley.pm index fc8726b34..0cd36a2ac 100644 --- a/perllib/FixMyStreet/Map/Bromley.pm +++ b/perllib/FixMyStreet/Map/Bromley.pm @@ -9,9 +9,7 @@ use base 'FixMyStreet::Map::FMS'; use strict; -sub map_type { - return '[ [ "", "a-" ], "https://{S}fix.bromley.gov.uk/tilma" ]'; -} +sub map_template { 'bromley' } sub map_tile_base { '-', "https://%sfix.bromley.gov.uk/tilma/%d/%d/%d.png"; diff --git a/perllib/FixMyStreet/Map/GoogleOL.pm b/perllib/FixMyStreet/Map/GoogleOL.pm index 2dfb697e5..55032d707 100644 --- a/perllib/FixMyStreet/Map/GoogleOL.pm +++ b/perllib/FixMyStreet/Map/GoogleOL.pm @@ -9,12 +9,8 @@ use parent 'FixMyStreet::Map::OSM'; use strict; -sub map_type { - return '""'; -} +sub map_type { '' } -sub map_template { - return 'google-ol'; -} +sub map_template { 'google-ol' } 1; diff --git a/perllib/FixMyStreet/Map/OSM.pm b/perllib/FixMyStreet/Map/OSM.pm index d4000f1a4..76af99d36 100644 --- a/perllib/FixMyStreet/Map/OSM.pm +++ b/perllib/FixMyStreet/Map/OSM.pm @@ -14,13 +14,9 @@ use Utils; use constant ZOOM_LEVELS => 6; use constant MIN_ZOOM_LEVEL => 13; -sub map_type { - return 'OpenLayers.Layer.OSM.Mapnik'; -} +sub map_type { 'OpenLayers.Layer.OSM.Mapnik' } -sub map_template { - return 'osm'; -} +sub map_template { 'osm' } sub map_tiles { my ( $self, %params ) = @_; diff --git a/perllib/FixMyStreet/Map/OSM/CycleMap.pm b/perllib/FixMyStreet/Map/OSM/CycleMap.pm index 8f1de39d2..bb6aefc8c 100644 --- a/perllib/FixMyStreet/Map/OSM/CycleMap.pm +++ b/perllib/FixMyStreet/Map/OSM/CycleMap.pm @@ -9,9 +9,7 @@ use base 'FixMyStreet::Map::OSM'; use strict; -sub map_type { - return 'OpenLayers.Layer.OSM.CycleMap'; -} +sub map_type { 'OpenLayers.Layer.OSM.CycleMap' } sub base_tile_url { return 'tile.opencyclemap.org/cycle'; diff --git a/perllib/FixMyStreet/Map/OSM/MapQuest.pm b/perllib/FixMyStreet/Map/OSM/MapQuest.pm index 3b0df14b1..ac80e61b5 100644 --- a/perllib/FixMyStreet/Map/OSM/MapQuest.pm +++ b/perllib/FixMyStreet/Map/OSM/MapQuest.pm @@ -9,13 +9,9 @@ use base 'FixMyStreet::Map::OSM'; use strict; -sub map_type { - return 'OpenLayers.Layer.OSM.MapQuestOpen'; -} +sub map_type { 'OpenLayers.Layer.OSM.MapQuestOpen' } -sub map_template { - return 'mapquest-attribution'; -} +sub map_template { 'mapquest-attribution' } sub map_tiles { my ( $self, %params ) = @_; diff --git a/perllib/FixMyStreet/Map/OSM/StreetView.pm b/perllib/FixMyStreet/Map/OSM/StreetView.pm index f37deaaae..12fbdb19d 100644 --- a/perllib/FixMyStreet/Map/OSM/StreetView.pm +++ b/perllib/FixMyStreet/Map/OSM/StreetView.pm @@ -9,13 +9,9 @@ use base 'FixMyStreet::Map::OSM'; use strict; -sub map_type { - return '""'; -} +sub map_type { '' } -sub map_template { - return 'osm-streetview'; -} +sub map_template { 'osm-streetview' } sub base_tile_url { return 'os.openstreetmap.org/sv'; diff --git a/perllib/FixMyStreet/Map/WMTSBase.pm b/perllib/FixMyStreet/Map/WMTSBase.pm index 909ada1d6..960a58a41 100644 --- a/perllib/FixMyStreet/Map/WMTSBase.pm +++ b/perllib/FixMyStreet/Map/WMTSBase.pm @@ -59,9 +59,7 @@ sub tile_parameters { } # This is used to determine which template to render the map with -sub map_type { - return 'fms'; -} +sub map_template { 'fms' } # Reproject a WGS84 lat/lon into an x/y coordinate in this map's CRS. # Subclasses will want to override this. @@ -198,7 +196,7 @@ sub get_map_hash { my @scales = $self->scales; return { %params, - type => $self->map_type, + type => $self->map_template, map_type => 'OpenLayers.Layer.WMTS', tiles => $self->map_tiles( %params ), copyright => $self->copyright(), diff --git a/perllib/FixMyStreet/Map/Zurich.pm b/perllib/FixMyStreet/Map/Zurich.pm index 1e302bdda..ed68daeee 100644 --- a/perllib/FixMyStreet/Map/Zurich.pm +++ b/perllib/FixMyStreet/Map/Zurich.pm @@ -67,9 +67,7 @@ sub copyright { return '© Stadt Zürich'; } -sub map_type { - return 'zurich'; -} +sub map_template { 'zurich' } # Reproject a WGS84 lat/lon into Swiss easting/northing |