diff --git a/examples/mapquest.html b/examples/mapquest.html new file mode 100644 index 0000000000..0fc02ec9e6 --- /dev/null +++ b/examples/mapquest.html @@ -0,0 +1,28 @@ + + + + + + + OpenLayers MapQuest Demo + + + + +

OpenLayers with MapQuest Tiles

+
+ This example demonstrates the use of MapQuest tiles with OpenLayers. +
+
+ MapQuest, OSM, XYZ +
+
+
+

+ See the mapquest.js source for + detail on using MapQuest tiles in OpenLayers. +

+
+ + + \ No newline at end of file diff --git a/examples/mapquest.js b/examples/mapquest.js new file mode 100644 index 0000000000..708cfdc4ad --- /dev/null +++ b/examples/mapquest.js @@ -0,0 +1,36 @@ +var map = new OpenLayers.Map({ + div: "map", + projection: "EPSG:900913", + layers: [ + new OpenLayers.Layer.XYZ( + "OpenStreetMap", + [ + "http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png", + "http://otile2.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png", + "http://otile3.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png", + "http://otile4.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png" + ], + { + attribution: "Tiles Courtesy of MapQuest ", + transitionEffect: "resize" + } + ), + new OpenLayers.Layer.XYZ( + "Imagery", + [ + "http://oatile1.mqcdn.com/naip/${z}/${x}/${y}.png", + "http://oatile2.mqcdn.com/naip/${z}/${x}/${y}.png", + "http://oatile3.mqcdn.com/naip/${z}/${x}/${y}.png", + "http://oatile4.mqcdn.com/naip/${z}/${x}/${y}.png" + ], + { + attribution: "Tiles Courtesy of MapQuest ", + transitionEffect: "resize" + } + ) + ], + center: [0, 0], + zoom: 1 +}); + +map.addControl(new OpenLayers.Control.LayerSwitcher()); \ No newline at end of file