当前位置:网站首页>Openlayers 5.0 loading ArcGIS Server slice service

Openlayers 5.0 loading ArcGIS Server slice service

2022-04-23 19:08:00 GIS roast lamb leg is delicious

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] ,// Center point 
     zoom: 12,// Current level 
     minZoom: 5,// Minimum grade 
     maxZoom: 17,// Maximum level 
     projection: 'EPSG:4326'// Coordinate system 
 })
 webgissource.VectorBaseMap=new Tile({
     visible: true,
     source: new TileArcGISRest({
        url: 'localhost:6080/arcgis/rest/services/founder/china/MapServer'// Service path 
     }),
  })
 var map = new Map({
     loadTilesWhileAnimating: true,
     target: 'mapDiv',// Containers id
     layers:[webgissource.VectorBaseMap],
     view: view
 });

版权声明
本文为[GIS roast lamb leg is delicious]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231908120989.html