【发布时间】:2016-03-01 18:56:53
【问题描述】:
我正在使用 openlayers v3.11.2 并且在尝试加载此服务时遇到了问题: https://gis7.nsgc.gov.ns.ca/arcgis/rest/services/BASE/NSTDB_10k_Utilities_WebMercator_WGS84/MapServer
我有使用此代码由 json 加载的图层
function loadJSON(ID, URL) {
var newLayer = new ol.layer.Tile({
id: ID,
source: new ol.source.TileJSON({
url: URL,
crossOrigin: 'anonymous'
})
});
map.addLayer(newLayer);
}
如果我尝试将上面的 url 放入它不起作用。我还尝试使用位于此处的 openlayers 网站“esri ArcGIS REST Feature Service example”中的示例,但也无法使用上述 url。 http://openlayers.org/en/v3.11.2/examples/vector-esri.html?q=esri
如果有人能给我一个工作示例或指出正确的方向,我将不胜感激。
【问题讨论】:
标签: json rest openlayers-3