aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map
diff options
context:
space:
mode:
authorGuillaume <fixmystreet@stereo.lu>2012-03-20 15:24:35 +0100
committerGuillaume <fixmystreet@stereo.lu>2012-03-20 16:24:54 +0100
commit192501e0116160e81f5166a5cbce164493dc8883 (patch)
tree90abed4a4d8328429ef468e78d19d30382deb441 /perllib/FixMyStreet/Map
parentd358f7db12af65a724dcef79524586c1fff45f31 (diff)
separated file for MapQuest
Diffstat (limited to 'perllib/FixMyStreet/Map')
-rw-r--r--perllib/FixMyStreet/Map/OSM/MapQuest.pm33
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;