mapquest直接磁贴访问已停止

Thi*_*ham 14 openlayers mapquest

截至2016-07-11,MapQuest已停止直接访问其瓷砖.他们似乎只支持Leaflet,iOS和Android SDK.知道如何让Openlayers再次使用MapQuest,或者我们应该考虑另一种选择吗?谢谢.

小智 3

对于 OpenLayers 的底图图像,我们基本上使用\nBing Maps、Mapbox 和 DigitalGlobe。所有这三项服务都需要 API 密钥,并且这三项服务都提供免费套餐。

\n\n

我目前正在使用 DigitalGlobe,迄今为止对其分辨率和覆盖范围感到非常满意。要在 OpenLayers 中使用它,\n首先在其站点上注册 API 密钥。

\n\n

http://mapsapidocs.digitalglobe.com/

\n\n

然后只需使用以下图块源(记住替换 YOUR_ACCESS_TOKEN):

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

这为您提供了分辨率从几米到 10 厘米\n的全球卫星图像!它们提供的基础层比我在本示例中提供的基础层更多,但是这应该可以让您快速入门。

\n\n

有关 DigitalGlobe 的更多 OpenLayers 示例,请参阅此链接:

\n\n

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

\n