diff options
Diffstat (limited to 'perllib/FixMyStreet/Map/Hounslow.pm')
-rw-r--r-- | perllib/FixMyStreet/Map/Hounslow.pm | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Map/Hounslow.pm b/perllib/FixMyStreet/Map/Hounslow.pm new file mode 100644 index 000000000..ce0831196 --- /dev/null +++ b/perllib/FixMyStreet/Map/Hounslow.pm @@ -0,0 +1,68 @@ +# FixMyStreet:Map::Hounslow +# Hounslow use their own tiles on their cobrand + +package FixMyStreet::Map::Hounslow; +use base 'FixMyStreet::Map::UKCouncilWMTS'; + +use strict; + +sub default_zoom { 5; } + +sub urls { [ 'https://gis.ringway.co.uk/server/rest/services/Hosted/HounslowOSBasemap/MapServer/WMTS/tile' ] } + +sub layer_names { [ 'Hosted_HounslowOSBasemap' ] } + +sub scales { + my $self = shift; + my @scales = ( + # The first 5 levels don't load and are really zoomed-out, so + # they're not included here. + # '600000', + # '500000', + # '400000', + # '300000', + # '200000', + '100000', + '75000', + '50000', + '25000', + '10000', + '8000', + '6000', + '4000', + '2000', + '1000', + '400', + ); + return @scales; +} + +sub zoom_parameters { + my $self = shift; + my $params = { + zoom_levels => scalar $self->scales, + default_zoom => $self->default_zoom, + min_zoom_level => 0, + id_offset => 5, # see note above about zoom layers we've skipped + }; + return $params; +} + +sub copyright { + return 'Contains Ordnance Survey data © Crown copyright and database rights 2019 OS. Use of this data is subject to <a href="/about/mapterms">terms and conditions</a>.'; +} + + +sub map_javascript { [ + '/vendor/OpenLayers/OpenLayers.wmts.js', + '/vendor/OpenLayers.Projection.OrdnanceSurvey.js', + '/js/map-OpenLayers.js', + '/js/map-wmts-base.js', + '/js/map-wmts-hounslow.js', + '/cobrands/fixmystreet-uk-councils/roadworks.js', + '/cobrands/fixmystreet/assets.js', + '/cobrands/hounslow/js.js', + '/cobrands/hounslow/assets.js', +] } + +1; |