openlayers加载动态ArcGIS服务
openlayers加载动态ArcGIS服务
openlayers加载ArcGIS动态服务图层ArcGISDanymicLayer
//arcgis动态图层服务地址
var url = 'https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/' +
'Specialty/ESRI_StateCityHighway_USA/MapServer';
//创建动态图层
var danymicLayer=new ol.layer.Image({
source: new ol.source.ImageArcGISRest({
ratio: 1,
params: {},
url: url
})
})
//初始化地图
var map = new ol.Map({
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],
target: 'map',
view: new ol.View({
center: [-10997148, 4569099],
zoom: 4
})
});
map.addLayer(danymicLayer);