Search code examples
openlayersmapquest

mapquest direct tile access discontinued


As of today 2016-07-11, MapQuest has discontinued direct access to their tiles. They seem to only support Leaflet, iOS and Android SDKs. Any idea how to get Openlayers to work with MapQuest again, or should we be thinking of a different alternative? Thanks.


Solution

  • For basemap imagery with OpenLayers, we are basically down to Bing Maps, Mapbox, and DigitalGlobe. All three services require an API key, and all three offer a free tier.

    I'm currently using DigitalGlobe and have been very pleased with their resolution and coverage thus far. To use it in OpenLayers, first sign up for an API key at their site.

    http://mapsapidocs.digitalglobe.com/

    Then just use the following tile source (remember to replace YOUR_ACCESS_TOKEN):

    new ol.layer.Tile({
      title: 'DigitalGlobe Maps API: Recent Imagery with Streets',
      attribution: "© DigitalGlobe, Inc",
      source: new ol.source.XYZ({
                url: 'http://api.tiles.mapbox.com/v4/digitalglobe.nal0mpda/{z}/{x}/{y}.png?access_token=YOUR_ACCESS_TOKEN'
      })
    })
    

    This gives you their global satellite imagery with resolutions ranging from a few meters down to 10 centimeters! They offer more base layers than the one I provided in this example, but this should get you started quickly.

    For more OpenLayers examples with DigitalGlobe, see this link:

    http://mapsapidocs.digitalglobe.com/docs/maps-api-openlayers