ArcGIS JS,服务范围(光栅)

ArcGIS JS,服务范围(光栅),gis,arcgis,arcgis-js-api,Gis,Arcgis,Arcgis Js Api,我正在使用ArcGisDynamicMapsServiceLayer从服务创建一个层 layerServicios = new esri.layers.ArcGISDynamicMapServiceLayer(service_url, { id: id_layer, opacity: 0.9, imageParameters: imageParams }); console.log('layerServicios', layerServicios): { attribu

我正在使用
ArcGisDynamicMapsServiceLayer从服务创建一个层

layerServicios = new esri.layers.ArcGISDynamicMapServiceLayer(service_url, {
    id: id_layer,
    opacity: 0.9,
    imageParameters: imageParams
});
console.log('layerServicios', layerServicios):

{
attributionDataUrl: ""
capabilities: "Map,Query,Data"
className: undefined
copyright: ""
credential: undefined
description: ""
dpi: 96
fullExtent: {type: "extent", xmin: -113.99999550732358, ymin: -62.566660275992355, xmax: -58.9560316118582, ymax: -14.26532106013001, …}
gdbVersion: undefined
getImageUrl: ƒ ()
hasAttributionData: false
id: "layer_mapas_3"
imageFormat: "png8"
imageTransparency: true
infoTemplates: null
initialExtent: {type: "extent", xmin: -70.34055967658617, ymin: -33.83365057356685, xmax: -70.31957965174547, ymax: -33.605022097738875, …}
isPNG32: undefined
layerDefinitions: []
layerInfos: (305) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, …]
loaded: true
maxImageHeight: 4096
maxImageWidth: 4096
maxRecordCount: 1000000000
maxScale: 0
minScale: 0
normalization: true
onError: ƒ ()
onLoad: ƒ ()
onOpacityChange: ƒ ()
etc...
}
当我使用graphic layer时,我在缩放到范围方面没有问题:

var gLayer = map.getLayer(id_layer);
var ge = GraphicsUtils.graphicsExtent(gLayer.graphics);
map.setExtent(ge, true);

但现在我不知道如何设置范围在这种情况下,使用服务返回光栅

您可以使用

map.setExtent(rasterLayer.fullExtent);