Exemplo n.º 1
0
    protected void generateFrame(int frameIndex, String directory)
    {
        //MapFunctionality mapFunctionality = (MapFunctionality)Map1.GetFunctionality(0);
        //mapDescription = mapFunctionality.MapDescription;

        ESRI.ArcGIS.ADF.ArcGISServer.MapDescription mapDescription = getMapDescription();
        ESRI.ArcGIS.ADF.ArcGISServer.ImageDescription imageDescription = getImageDescription();
        ESRI.ArcGIS.ADF.ArcGISServer.Envelope exportedExtent = null;
        //Set the current map extent

        mapDescription.MapArea.Extent = (exportedExtent != null)
        ? exportedExtent :
        ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Converter.FromAdfEnvelope(Map1.Extent);
        //MapResourceBase mapResource = (MapResourceBase)mapFunctionality.Resource;
        //ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy mapServerProxy = mapResource.MapServerProxy;
        ESRI.ArcGIS.ADF.ArcGISServer.MapServerProxy mapServerProxy = getMapServerProxy();
        MapFrame frame = new MapFrame(mapDescription, mapServerProxy, imageDescription);
        //frame.exportImage();
        ESRI.ArcGIS.ADF.ArcGISServer.MapImage mapImage = frame.exportImage();

        frame.saveImage(mapImage, directory, frameIndex);
    }