Images associated with sublayers in MapImageLayer

06-04-2019 08:00 AM
Occasional Contributor II

From inspecting the sublayers I get in the MapImageLayer I get from my service, it seems that the renderer associated with each does not contain the information (e.g., url or base64 string) for any images associated with the sublayers (in fact, the renderer appears to be null, even though everything draws properly). Apparently I can get that information by using Request or maybe in a Legend, but I'd like to know if the information isn't in the sublayer object when the mapimagelayer is retrieved and I'm just not looking for it in the right place or at the right time.

Here's what I see for one layer (that I know has an image associated with it that appears on my map and my legend) when I inspect it:

definitionExpression: (...)
id: (...)
labelingInfo: (...)
labelsVisible: (...)
layer: (...)
legendEnabled: (...)
listMode: (...)
maxScale: (...)
minScale: (...)
opacity: (...)
parent: (...)
popupEnabled: (...)
popupTemplate: (...)
renderer: null
source: (...)
sublayers: (...)
title: "Compressor Station"
url: (...)
visible: (...)
_sublayersHandles: null
constructed: (...)
destroyed: (...)
initialized: (...)
__accessor__: b {host: {…}, _origin: 6, cursors: {…}, ctorArgs: null, destroyed: false, …}
__proto__: Object

0 Kudos
1 Reply
MVP Esteemed Contributor


   That is correct. You will not get a renderer from a sublayer as ArcGIS Server draws the image serverside and only an image is returned for the MapImageLayer.