diff options
Diffstat (limited to 'perllib/FixMyStreet/Map/OSM')
-rw-r--r-- | perllib/FixMyStreet/Map/OSM/MapQuest.pm | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/OSM/StreetView.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/Map/OSM/TonerLite.pm | 38 |
3 files changed, 43 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Map/OSM/MapQuest.pm b/perllib/FixMyStreet/Map/OSM/MapQuest.pm index 2c3cbaf00..4fc8ba57d 100644 --- a/perllib/FixMyStreet/Map/OSM/MapQuest.pm +++ b/perllib/FixMyStreet/Map/OSM/MapQuest.pm @@ -33,4 +33,8 @@ sub base_tile_url { return 'mqcdn.com/tiles/1.0.0/map/'; } +sub copyright { + 'Data, imagery and map information provided by <a href="http://www.mapquest.com/">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png" />, <a href="http://openstreetmap.org/">OpenStreetMap</a> and contributors, <a href="http://opendatacommons.org/licenses/odbl/">ODbL</a>' +} + 1; diff --git a/perllib/FixMyStreet/Map/OSM/StreetView.pm b/perllib/FixMyStreet/Map/OSM/StreetView.pm index c70dd93aa..87c335dd6 100644 --- a/perllib/FixMyStreet/Map/OSM/StreetView.pm +++ b/perllib/FixMyStreet/Map/OSM/StreetView.pm @@ -22,6 +22,7 @@ sub base_tile_url { } sub copyright { + 'Contains OS data © Crown copyright and database right 2013'; } 1; diff --git a/perllib/FixMyStreet/Map/OSM/TonerLite.pm b/perllib/FixMyStreet/Map/OSM/TonerLite.pm new file mode 100644 index 000000000..543cd6002 --- /dev/null +++ b/perllib/FixMyStreet/Map/OSM/TonerLite.pm @@ -0,0 +1,38 @@ +#!/usr/bin/perl +# +# FixMyStreet:Map::OSM::TonerLite +# OSM TonerLite maps on FixMyStreet. +# +# Map tiles by <http://stamen.com> Stamen Design, +# under <http://creativecommons.org/licenses/by/3.0>CC BY 3.0. +# Data by <http://openstreetmap.org> OpenStreetMap, +# under <http://www.openstreetmap.org/copyright> ODbL. +# +# Copyright (c) 2014 UK Citizens Online Democracy. All rights reserved. +# Email: hakim@mysociety.org; WWW: http://www.mysociety.org/ + +package FixMyStreet::Map::OSM::TonerLite; +use base 'FixMyStreet::Map::OSM'; + +use strict; + +sub map_type { 'OpenLayers.Layer.Stamen' } + +sub map_template { 'osm-toner-lite' } + +sub copyright { + 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under <a href="http://www.openstreetmap.org/copyright">ODbL</a>.' +} + +sub map_tiles { + my ( $self, %params ) = @_; + my ( $x, $y, $z ) = ( $params{x_tile}, $params{y_tile}, $params{zoom_act} ); + return [ + "https://stamen-tiles-a.a.ssl.fastly.net/toner-lite/$z/" . ($x - 1) . "/" . ($y - 1) . ".png", + "https://stamen-tiles-b.a.ssl.fastly.net/toner-lite/$z/$x/" . ($y - 1) . ".png", + "https://stamen-tiles-c.a.ssl.fastly.net/toner-lite/$z/" . ($x - 1) . "/$y.png", + "https://stamen-tiles-d.a.ssl.fastly.net/toner-lite/$z/$x/$y.png", + ]; +} + +1; |