One of the master programmers here at work pointed out the method exportMapImage which returns a url reference to the image that fills the ArcGISDynamicMapServiceLayer that I am extending. I then load that image usingactionscripts Loader class. from there I can get the bitmapdata of the image/layer. This worked out perfectly for me. Now I can do bitmap manipulation on the layer. Any response or words of advise would be greatly appreciated.
public class GraphicLayerThresholding extends ArcGISDynamicMapServiceLayer
{
override protected function updateLayer():void
{
graphics.clear();
var imageParams:ImageParameters = new ImageParameters();
imageParams.height = map.height;
imageParams.width = map.width;
imageParams.format = 'png32';
var mapImage:MapImage = new MapImage();
this.exportMapImage(imageParams, new AsyncResponder(onResult, onFault));
}
private function onFault(info:Object, token:Object = null):void
{
Alert.show(info.toString(), "Export Problem");
}
private function onResult(mi:MapImage, token:Object = null):void
{
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
var request:URLRequest = new URLRequest(mi.href);
loader.load(request);
}
private function completeHandler(event:Event):void {
var loader:Loader = Loader(event.target.loader);
_image = Bitmap(loader.content);
_updateGraphic(_image, _thresholdValue);
}
}
Michael L. HaydenWeb Application DeveloperData Transfer SolutionsFort Collins, Denver(970) 472-0032 (phone)www.dtsagile.com