Hello,This is a relatively long post, so I hope it isn't for nothing. I've written a class based on ArcGISDynamicMapServiceLayer that uses SOAP methods on the client. I chose that class mostly for the Interfaces it implements (Specifically ILegendSupport and ISublayerVisibilitySupport). The short version of why is twofold: label toggling and max image size exported by the server. My class works fine for the most part. Using the SOAP method to export a map image as a url (esriImageReturnUrl) that points to an image on the ArcGIS Server, it successfully generates the link. It is then handled by the OnUrlComplete event handler passed into the Overrided Method GetUrl where it is downloaded and displayed on the map. The occasional issue I'm having is depending on the configuration of the ArcGIS Server hosting the generated image, the url points to a virtual directory on the remote server that may not actually exist, or it exists but points to an internal server name for example:http://<internalservername>/argcisoutput/imagegenerated.png.If I return bytes that make up the image (esriReturnMimeData) instead of a remote URL pointing to that remote image then I don't have to worry about the path above; it get the bytes directly. However, having inherited from ArcGISDynamicMapServiceLayer, I'm having trouble figuring out how to handle the bytes once they're received.As it is now, here is some code for generating a url, edited for brevity...Public Overrides Sub GetUrl(extent As ESRI.ArcGIS.Client.Geometry.Envelope, width As Integer, height As Integer, onComplete As ESRI.ArcGIS.Client.DynamicMapServiceLayer.OnUrlComplete) 'Omitted Code preparing the MapDescription (mapsesc) Dim imgdisp As New SoapExporter.ImageDisplay With {.ImageHeight = CInt(Me.Map.ActualHeight), .ImageWidth = CInt(Me.Map.ActualWidth), .ImageDPI = Me.DPI} Dim imgtype As New SoapExporter.ImageType With {.ImageFormat = Me.SoapImageFormat, .ImageReturnType = SoapExporter.esriImageReturnType.esriImageReturnURL} Dim imgdesc As New SoapExporter.ImageDescription With {.ImageDisplay = imgdisp, .ImageType = imgtype} Dim package As New List(Of Object) From {onComplete, width, height, extent} ' ms is the MapServerPortClient ms.ExportMapImageAsync(mapdesc, imgdesc, package) End Sub Private Sub ExportMapImage_Completed(sender As Object, e As SoapExporter.ExportMapImageCompletedEventArgs) Dim imageUrl As String = e.Result.ImageURL Dim package As List(Of Object) = CType(e.UserState, List(Of Object)) Dim onComplete As ESRI.ArcGIS.Client.DynamicMapServiceLayer.OnUrlComplete = TryCast(package(0), ESRI.ArcGIS.Client.DynamicMapServiceLayer.OnUrlComplete) onComplete(imageUrl, CInt(package(1)), CInt(package(2)), CType(package(3), ESRI.ArcGIS.Client.Geometry.Envelope)) End Sub
If i use esriReturnMimeData instead of esriImageReturnURL, the ExportMapImage_Completed handler can still handle the result, as the bytes are also property of ExportMapImageCompletedEventArgs. The question I have is what do I do from there to get them on the map?Lance