From aa401b3a370ccd58534d615da50459ebd7c7da5a Mon Sep 17 00:00:00 2001
From: Mikkel Hoegh <mikkel@hoegh.org>
Date: Fri, 28 Oct 2011 18:39:53 +0200
Subject: [PATCH] Adding support for MapQuest Open tiles.

---
 includes/openlayers.layers.inc |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/includes/openlayers.layers.inc b/includes/openlayers.layers.inc
index 047e77f..5f91398 100644
--- a/includes/openlayers.layers.inc
+++ b/includes/openlayers.layers.inc
@@ -62,6 +62,41 @@ function _openlayers_openlayers_layers() {
 
   $layer = new stdClass();
   $layer->api_version = 1;
+  $layer->name = 'mapquest_osm';
+  $layer->title = 'MapQuest OSM';
+  $layer->description = 'MapQuest’s rendering of OpenStreetMap.';
+  $layer->data = array(
+    'baselayer' => TRUE,
+    'attribution' => t('&copy;<a href="@ccbysa">CCBYSA</a> 2010
+      <a href="@openstreetmap">OpenStreetMap.org</a> contributors',
+      array(
+        '@openstreetmap' => 'http://www.openstreetmap.org/',
+        '@ccbysa' => 'http://creativecommons.org/licenses/by-sa/2.0/',
+      )
+    ) . '. '. t('Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>.'),
+    'projection' => array('900913'),
+    'layer_type' => 'openlayers_layer_type_xyz',
+    'url' => 'http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png',
+  );
+  $layers[$layer->name] = $layer;
+
+  $layer = new stdClass();
+  $layer->api_version = 1;
+  $layer->name = 'mapquest_openaerial';
+  $layer->title = 'MapQuest Open Aerial';
+  $layer->description = 'MapQuest’s aerial photo map.';
+  $layer->data = array(
+    'baselayer' => TRUE,
+    'attribution' => t('Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency.')
+      . ' '. t('Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a>.'),
+    'projection' => array('900913'),
+    'layer_type' => 'openlayers_layer_type_xyz',
+    'url' => 'http://oatile1.mqcdn.com/naip/${z}/${x}/${y}.png',
+  );
+  $layers[$layer->name] = $layer;
+
+  $layer = new stdClass();
+  $layer->api_version = 1;
   $layer->name = 'yahoo_satellite';
   $layer->title = 'Yahoo Maps Satellite';
   $layer->description = 'Yahoo satellite imagery tiles.';
@@ -294,5 +329,7 @@ function _openlayers_openlayers_layers_i18n() {
     t('Yahoo hybrid of streets and satellite tiles.'),
     t('Yahoo satellite imagery tiles.'),
     t('Yahoo streets tiles.'),
+    t('MapQuest’s rendering of OpenStreetMap.'),
+    t('MapQuest’s aerial photo map.'),
   );
 }
-- 
1.7.5.4

