import Map from 'ol/Map.js';
import View from 'ol/View.js';
import Tile from 'ol/layer/Tile.js';
import TileArcGISRest from 'ol/source/TileArcGISRest.js';
var webgissource={}
var view=new View({
center:[106.516,29.56] ,//中心点
zoom: 12,//当前等级
minZoom: 5,//最小等级
maxZoom: 17,//最大等级
projection: 'EPSG:4326'//坐标系
})
webgissource.VectorBaseMap=new Tile({
visible: true,
source: new TileArcGISRest({
url: 'localhost:6080/arcgis/rest/services/founder/china/MapServer'//服务路径
}),
})
var map = new Map({
loadTilesWhileAnimating: true,
target: 'mapDiv',//容器id
layers:[webgissource.VectorBaseMap],
view: view
});
openlayers 5.0 加载arcgis server 切片服务
最新推荐文章于 2024-01-29 21:22:19 发布