Creating custom dynamic image layer

Discussion created by nalenb on May 9, 2013
Latest reply on Aug 10, 2013 by ebader-esristaff
I'm working on an Android version of my iOS app. In my app I need to fetch an image from the server where the server isn't an arcgis server, similar to my question here

So at this point I know the Envelope and the url of the image on the server. I'm trying to create a subclass of DynamicLayer thinking that getImage will get called at some point so I can return my image data fetched from the server, but getImage is never called.

When I'm ready I create a new instance of my custom class and add that as a layer to the existing map view. However, nothing in my custom class seems to be getting called.

What do I need to override in DynamicLayer in order to return image data to the map view?

Right now I"m overriding getFullExtent, getSpatialReference, getImage, and requestImage but none of these methods get called.

In my constructor I'm calling
super(url) with my custom image url, but really this url shouldn't refer to anything right?

Or should I be using some other class to subclass here?