对接ArcGIS Image Server

希望使用WebGL对接ImageServer,但是Cesium底层并未提供该ImageryProvider,所以只能使用UrlTemplateImageryProvider进行自定义对接
总结对接ImageServer时服务分为两种:1、WebMercator坐标、2、经纬度坐标
WebMercator坐标对接如下:

new Cesium.UrlTemplateImageryProvider({    
      url: 'https://sampleserver6.arcgisonline.com/arcgis/rest/services/NLCDLandCover2001/ImageServer/exportImage?bbox={westProjected}%2C{southProjected}%2C{eastProjected}%2C{northProjected}&size={width}%2C{height}&f=image'  
     })

注意后面这段:?bbox={westProjected}%2C{southProjected}%2C{eastProjected}%2C{northProjected}&size={width}%2C{height}&f=image
写的可都是Projected哦
如果使用的经纬度坐标,理所当然则需要改为Degrees,
so
WGS84坐标对接如下:

new Cesium.UrlTemplateImageryProvider({    
      url: '.../ImageServer/exportImage?bbox={westDegrees}%2C{southDegrees}%2C{eastDegrees}%2C{northDegrees}&size={width}%2C{height}&f=image'  
     })

你可能感兴趣的:(对接ArcGIS Image Server)