diff options
author | Struan Donald <struan@exo.org.uk> | 2012-05-23 17:39:00 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-05-23 17:39:00 +0100 |
commit | 7cb6bb21f713bc07a06ece5f4109cd6bd5a7f0b0 (patch) | |
tree | eaff3aa286d8e1910b33c204c79b6837e109a216 /perllib/FixMyStreet/Map/OSM/MapQuest.pm | |
parent | 9019fda388f9232181387e8cce1d28e8b89de1ee (diff) | |
parent | 3b0e39a4c89e4c184f30c6131936dc63845d6a1f (diff) |
Merge remote-tracking branch 'origin/master' into phonegap
Diffstat (limited to 'perllib/FixMyStreet/Map/OSM/MapQuest.pm')
-rw-r--r-- | perllib/FixMyStreet/Map/OSM/MapQuest.pm | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Map/OSM/MapQuest.pm b/perllib/FixMyStreet/Map/OSM/MapQuest.pm new file mode 100644 index 000000000..9cf6de01f --- /dev/null +++ b/perllib/FixMyStreet/Map/OSM/MapQuest.pm @@ -0,0 +1,33 @@ +#!/usr/bin/perl +# +# FixMyStreet:Map::OSM::CycleMap +# OSM CycleMap maps on FixMyStreet. +# +# Copyright (c) 2010 UK Citizens Online Democracy. All rights reserved. +# Email: matthew@mysociety.org; WWW: http://www.mysociety.org/ + +package FixMyStreet::Map::OSM::MapQuest; +use base 'FixMyStreet::Map::OSM'; + +use strict; + +sub map_type { + return 'OpenLayers.Layer.OSM.MapQuestOpen'; +} + +sub map_tiles { + my ($self, $x, $y, $z) = @_; + my $tile_url = $self->base_tile_url(); + return [ + "http://otile1.$tile_url/$z/" . ($x - 1) . "/" . ($y - 1) . ".png", + "http://otile2.$tile_url/$z/$x/" . ($y - 1) . ".png", + "http://otile3.$tile_url/$z/" . ($x - 1) . "/$y.png", + "http://otile4.$tile_url/$z/$x/$y.png", + ]; +} + +sub base_tile_url { + return 'mqcdn.com/tiles/1.0.0/osm/'; +} + +1; |