MapQuest-OSM Tiles + MapQuest Open Aerial Tiles

As part of our Open Initiatives, we currently offer two tilesets: the MapQuest-OpenStreetMap Tiles and the MapQuest Open Aerial Tiles. Here you'll learn some tile basics, how to incorporate them into applications, and the proper attribution needed. Usage of these tiles is governed by our Terms of Use.

 

If you're looking to use our standard tiles using licensed data, please refer to the JavaScript Maps API or the Flash Maps API.

 

 

Overview

If you're already familiar with using OSM tiles (see Tiles - OpenStreetMap Wiki), then you'll find that using the MapQuest tiles is very straightforward. The tile URLs are similar to regular OSM tiles, with only the front of the URL being different as seen below.

 

MapQuest-OSM Tile URL:
http://otile1.mqcdn.com/tiles/1.0.0/map/15/5240/12661.jpg

 

Replace http://a.tile.openstreetmap.org with http://otile1.mqcdn.com/tiles/1.0.0/map.

 

Note: There are 4 subdomains set up for the MapQuest-hosted tiles: otile1 to otile4. All subdomains point to the same CDN. Just like with OSM’s a.tile to c.tile subdomains, the MapQuest subdomains are provided to work around browser limitations on the number of simultaneous HTTP connections to each “host”. Browser-based applications can request multiple map tiles from multiple subdomains faster than requesting map tiles from just one subdomain.

 

MapQuest Open Aerial Tile URL:
http://otile1.mqcdn.com/tiles/1.0.0/sat/15/5240/12661.jpg

 

Replace http://a.tile.openstreetmap.org with http://otile1.mqcdn.com/tiles/1.0.0/sat.

 

Note: There are 4 subdomains set up for the MapQuest-hosted tiles: otile1 to otile4. All subdomains point to the same CDN. Just like with OSM’s a.tile to c.tile subdomains, the MapQuest subdomains are provided to work around browser limitations on the number of simultaneous HTTP connections to each “host”. Browser-based applications can request multiple map tiles from multiple subdomains faster than requesting map tiles from just one subdomain.

 

Please also note that global coverage is provided at zoom levels 0-11. Zoom Levels 12+ are provided only in the United States (lower 48).

 

OpenStreetMap Tile URL:
http://a.tile.openstreetmap.org/15/5240/12661.png

 

More information can also be found on the wiki at OpenStreetMap.org and on the wiki page for MapQuest.

 

Adding the Open Tiles

Hopefully you now have an understanding of the basic URL structure for the MapQuest Open Tiles. If you're able to take the information and incorporate the tiles into your application, great! If not, have a look at our mini tutorials we put together:

 

a. Open JavaScript Maps API

The simplest method to get started using our open tiles is by using the Open JavaScript Maps API, as there's no need to understand any of the above. Just follow the Basic Map documentation on our samples page, then move on to adding the zoom controller of your choice, POIs, overlays, etc. (Note: the API currently only supports the MapQuest-OSM tiles. Open Aerial Tiles coming soon!)

 

b. Potlatch 2

Potlatch 2 already offers various tile solutions when editing OpenStreetMap but they also make it simple to add your own. Below is an example of adding the Open Aerial Tiles:

 

1. Visit http://open.mapquest.com/ or any of our other Open Beta domains and click the Edit button above the map zoom controls to launch Potlatch 2.
2. Click the Background button, then Edit as highlighted below in red.

 

3. Click Add.
4. Enter a Name for your tileset, such as Open Aerial Tiles.
5. Enter http://otile1.mqcdn.com/tiles/1.0.0/sat/$z/$x/$y.jpg as the URL.

 

c. JOSM

A more advanced tool for editing OpenStreetMap, JOSM is constantly being improved so please be sure you're running the latest version - http://josm.openstreetmap.de/ Imagery is now also supported so a separate WMS plugin is no longer necessary.

 

To make things even easier, the option to use the MapQuest Open Aerial Tiles comes prepackaged with the JOSM download. Simply choose it from the dropdown menu and you're done!

 

d. OpenLayers

A popular choice among developers, OpenLayers allows one to easily create their own interactive map. The following code creates two base layers, one for the MapQuest-OSM Tiles and the other for the MapQuest Open Aerial Tiles as shown below.

 

 

<html>
<head>
<title>OpenLayers + MapQuest</title>
<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script type="text/javascript">
    var map;
    var arrayOSM;
    var arrayAerial;
    var baseOSM;
    var baseAerial;
   
    function init(){
        map = new OpenLayers.Map('map');
        arrayOSM = ["http://otile1.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.jpg",
                    "http://otile2.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.
jpg",
                    "http://otile3.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.
jpg",
                    "http://otile4.mqcdn.com/tiles/1.0.0/map/${z}/${x}/${y}.
jpg"];
        arrayAerial = ["http://otile1.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.
jpg",
                        "http://otile2.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.
jpg",
                        "http://otile3.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.
jpg",
                        "http://otile4.mqcdn.com/tiles/1.0.0/sat/${z}/${x}/${y}.
jpg"];
       
        baseOSM = new OpenLayers.Layer.OSM("MapQuest-OSM Tiles", arrayOSM);
        baseAerial = new OpenLayers.Layer.OSM("MapQuest Open Aerial Tiles", arrayAerial);
      
        map.addLayer(baseOSM);
        map.addLayer(baseAerial);
        map.addControl(new OpenLayers.Control.LayerSwitcher());
        map.setCenter(
            new OpenLayers.LonLat(-71.057205,42.362942).transform(
                new OpenLayers.Projection("EPSG:4326"),map.getProjectionObject()), 16
        );      
    }  
</script>
</head>

<body onload="init()">
    <div id="map"></div>
</body>
</html>

 

There you have it! All that's left is for you to add some content to it, properly attribute it (see Terms of Use) and make it your own. If you need additional OpenLayers help, be sure to check out their samples page.

 

Terms of Use

The MapQuest Open Tiles are available for use for free under the following conditions:

 

  • If using the MapQuest-OSM tiles, OpenStreetMap must be given credit for the data – see this section of OSM's legal FAQ for details.

  • If using the MapQuest Open Aerial Tiles, please attribute as: "Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency".

  • Please place “Tiles Courtesy of MapQuest ” on your page, or in the copyright area of the map and link the word “MapQuest” to http://www.mapquest.com.  Below is a code snippet you can use for your site:

 

<p>Tiles Courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png"></p>

 

  • If your application will get heavy usage (currently defined as more than 4,000 tiles per second), please let us know by sending us an email at open@mapquest.com. Please include the estimate of your expected usage so that we will be aware and accommodate the extra traffic.

  • If there will be an announcement (for example – a press release or a corporate announcement), please contact MapQuest at open@mapquest.com to let us know of the good news and any expected jumps in map tile usage.

  • Usage of these tiles are at your own risk.

  • Usage of these tiles is governed by our Terms of Use.

 

OpenStreetMap data is licensed under the Open Data Commons Open Database License (ODbL).