diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-05-25 14:28:40 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-05-25 14:28:40 +0100 |
commit | fe35ddba0fab0ebc413300dff0f1f323aec40e9a (patch) | |
tree | 00e7253bf8f6fa6e399a857450b31fe4b3d1bf12 /perllib/FixMyStreet/Map/OSM.pm | |
parent | 34296c409fe2ab9f02e5aeb14100570a8fb68dea (diff) |
Make tile URL a parameter so it can be different, bring OSM's StreetView under the same code.
Diffstat (limited to 'perllib/FixMyStreet/Map/OSM.pm')
-rw-r--r-- | perllib/FixMyStreet/Map/OSM.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Map/OSM.pm b/perllib/FixMyStreet/Map/OSM.pm index 9ccbac017..971f88fd7 100644 --- a/perllib/FixMyStreet/Map/OSM.pm +++ b/perllib/FixMyStreet/Map/OSM.pm @@ -10,7 +10,6 @@ package FixMyStreet::Map::OSM; use strict; use Math::Trig; -use mySociety::Web qw(ent NewURL); use Utils; sub header_js { @@ -25,6 +24,14 @@ sub map_type { return 'OpenLayers.Layer.OSM.Mapnik'; } +sub base_tile_url { + return 'tile.openstreetmap.org'; +} + +sub copyright { + return _('Map © <a id="osm_link" href="http://www.openstreetmap.org/">OpenStreetMap</a> and contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'); +} + # display_map C PARAMS # PARAMS include: # latitude, longitude for the centre point of the map @@ -72,6 +79,8 @@ sub display_map { latitude => $params{latitude}, longitude => $params{longitude}, map_type => $self->map_type(), + tile_url => $self->base_tile_url(), + copyright => $self->copyright(), x_tile => $x_tile, y_tile => $y_tile, zoom => $zoom, |