exportMapImage - Newbie trying to integrate it

Discussion created by eitdhc on Sep 21, 2010
Latest reply on May 31, 2011 by eitdhc
I am trying to get the following function to work, however, it gives an "unsupoorted method" error at mapImage=map.exportMapImage(mExport_Settings); - What have I missed? (using 1.6 and have set dojo.require("esri.layers.agsdynamic"); as per API).  I know there is an option for a callback in the exportMapImage() but for now I am just testing things.

function ExportMap() {
            var mExport_Settings = new esri.layers.ImageParameters();

            //Could be png8/24, jpg,bmp,gif
            mExport_Settings.format = "png24";
            mExport_Settings.bbox = map.extent;
            mExport_Settings.height = "800";
            mExport_Settings.width = "800";
            mExport_Settings.layerIds = [1, 4];
            mExport_Settings.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW;
            mExport_Settings.transparent = true;

            var mapImage = esri.layers.MapImage;

            mapImage = map.exportMapImage(mExport_Settings);