aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Cobrand/Bexley.pm2
-rw-r--r--perllib/FixMyStreet/Map/Bexley.pm39
-rw-r--r--t/cobrand/bexley.t19
-rw-r--r--t/map/tests.t1
-rw-r--r--web/js/map-bexley.js24
5 files changed, 1 insertions, 84 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm
index eda276add..93484dc68 100644
--- a/perllib/FixMyStreet/Cobrand/Bexley.pm
+++ b/perllib/FixMyStreet/Cobrand/Bexley.pm
@@ -9,7 +9,7 @@ sub council_area { 'Bexley' }
sub council_name { 'London Borough of Bexley' }
sub council_url { 'bexley' }
sub get_geocoder { 'Bexley' }
-sub map_type { 'Bexley' }
+sub map_type { 'MasterMap' }
sub disambiguate_location {
my $self = shift;
diff --git a/perllib/FixMyStreet/Map/Bexley.pm b/perllib/FixMyStreet/Map/Bexley.pm
deleted file mode 100644
index d3c7a013a..000000000
--- a/perllib/FixMyStreet/Map/Bexley.pm
+++ /dev/null
@@ -1,39 +0,0 @@
-# FixMyStreet:Map::Bexley
-#
-# A combination of FMS OS maps and our own tiles
-
-package FixMyStreet::Map::Bexley;
-use base 'FixMyStreet::Map::FMS';
-
-use strict;
-
-use constant ZOOM_LEVELS => 7;
-
-sub map_template { 'fms' }
-
-sub map_javascript { [
- '/vendor/OpenLayers/OpenLayers.wfs.js',
- '/js/map-OpenLayers.js',
- '/js/map-bing-ol.js',
- '/js/map-fms.js',
- '/js/map-bexley.js',
-] }
-
-sub map_tiles {
- my ( $self, %params ) = @_;
- my ( $x, $y, $z ) = ( $params{x_tile}, $params{y_tile}, $params{zoom_act} );
- if ($z >= 17) {
- my $base = "//%stilma.mysociety.org/bexley/%d/%d/%d.png";
- return [
- sprintf($base, 'a.', $z, $x-1, $y-1),
- sprintf($base, 'b.', $z, $x, $y-1),
- sprintf($base, 'c.', $z, $x-1, $y),
- sprintf($base, '', $z, $x, $y),
- ];
- } else {
- return $self->SUPER::map_tiles(%params);
- }
-}
-
-1;
-
diff --git a/t/cobrand/bexley.t b/t/cobrand/bexley.t
index 3cf71798e..6b618762f 100644
--- a/t/cobrand/bexley.t
+++ b/t/cobrand/bexley.t
@@ -6,7 +6,6 @@ use Catalyst::Test 'FixMyStreet::App';
use_ok 'FixMyStreet::Cobrand::Bexley';
use_ok 'FixMyStreet::Geocode::Bexley';
-use_ok 'FixMyStreet::Map::Bexley';
my $ukc = Test::MockModule->new('FixMyStreet::Cobrand::UKCouncils');
$ukc->mock('lookup_site_code', sub {
@@ -43,7 +42,6 @@ $category->update;
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'bexley' ],
MAPIT_URL => 'http://mapit.uk/',
- MAP_TYPE => 'Bexley',
STAGING_FLAGS => { send_reports => 1, skip_checks => 0 },
COBRAND_FEATURES => { open311_email => { bexley => { p1 => 'p1@bexley', lighting => 'thirdparty@notbexley.example.com,another@notbexley.example.com' } } },
}, sub {
@@ -183,23 +181,6 @@ subtest 'nearest road returns correct road' => sub {
is $cobrand->_nearest_feature($cfg, 545451, 174380, $features), '20101226';
};
-subtest 'correct map tiles used' => sub {
- my %test = (
- 16 => [ '-', 'oml' ],
- 20 => [ '.', 'bexley' ]
- );
- foreach my $zoom (qw(16 20)) {
- my $tiles = FixMyStreet::Map::Bexley->map_tiles(x_tile => 123, y_tile => 456, zoom_act => $zoom);
- my ($sep, $lyr) = @{$test{$zoom}};
- is_deeply $tiles, [
- "//a${sep}tilma.mysociety.org/$lyr/$zoom/122/455.png",
- "//b${sep}tilma.mysociety.org/$lyr/$zoom/123/455.png",
- "//c${sep}tilma.mysociety.org/$lyr/$zoom/122/456.png",
- "//tilma.mysociety.org/$lyr/$zoom/123/456.png",
- ];
- }
-};
-
my $geo = Test::MockModule->new('FixMyStreet::Geocode');
$geo->mock('cache', sub {
my $typ = shift;
diff --git a/t/map/tests.t b/t/map/tests.t
index 1c5c2b64a..499447ad5 100644
--- a/t/map/tests.t
+++ b/t/map/tests.t
@@ -2,7 +2,6 @@ use FixMyStreet::Map;
use Test::More;
my $requires = {
- 'Bexley' => 'map-bexley.js',
'Bing' => 'map-bing-ol.js',
'Bristol' => 'map-wmts-bristol.js',
'Bromley' => 'map-fms.js',
diff --git a/web/js/map-bexley.js b/web/js/map-bexley.js
deleted file mode 100644
index 38911f950..000000000
--- a/web/js/map-bexley.js
+++ /dev/null
@@ -1,24 +0,0 @@
-fixmystreet.maps.config = (function(original) {
- return function(){
- original();
- fixmystreet.map_type = OpenLayers.Layer.Bexley;
- };
-})(fixmystreet.maps.config);
-
-OpenLayers.Layer.Bexley = OpenLayers.Class(OpenLayers.Layer.BingUK, {
- get_urls: function(bounds, z) {
- if (z < 17) {
- return OpenLayers.Layer.BingUK.prototype.get_urls.apply(this, arguments);
- }
-
- var urls = [];
- var servers = [ '', 'a.', 'b.', 'c.' ];
- var base = "//{S}tilma.mysociety.org/bexley/${z}/${x}/${y}.png";
- for (var i=0; i < servers.length; i++) {
- urls.push( base.replace('{S}', servers[i]) );
- }
- return urls;
- },
-
- CLASS_NAME: "OpenLayers.Layer.Bexley"
-});