Search Results for

    Show / Hide Table of Contents

    Interface IMappingService

    Provides services for interaction with the runtime map

    Namespace: OSGeo.MapGuide.MaestroAPI.Services
    Assembly: OSGeo.MapGuide.MaestroAPI.dll
    Syntax
    public interface IMappingService : IService
    Examples

    This example shows how to obtain a mapping service instance. Note that you should check if this service type is supported through its capabilities.

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);

    Methods

    | Improve this Doc View Source

    CreateMap(IMapDefinition)

    Creates a new runtime map instance from an existing map definition.

    Declaration
    RuntimeMap CreateMap(IMapDefinition mapDef)
    Parameters
    Type Name Description
    IMapDefinition mapDef
    Returns
    Type Description
    RuntimeMap
    Remarks

    Calculation of meters-per-unit may differ between implementations. This may have an adverse effect on things such as rendering and measuring depending on the underlying implementation

    If you are certain of the meters-per-unit value required, use the overloaded method that accepts a metersPerUnit parameter.

    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    IMapDefinition mapDef = (IMapDefinition)conn.ResourceService.GetResource("Library://Path/To/My.MapDefinition");
    RuntimeMap map = mappingSvc.CreateMap(mapDef);
    | Improve this Doc View Source

    CreateMap(IMapDefinition, Boolean)

    Creates a new runtime map instance from an existing map definition.

    Declaration
    RuntimeMap CreateMap(IMapDefinition mapDef, bool suppressErrors)
    Parameters
    Type Name Description
    IMapDefinition mapDef
    System.Boolean suppressErrors

    If false, this method will throw an exception on the first layer that cannot be initialized. Otherwise, any exceptions that occur during layer initialization are suppressed

    Returns
    Type Description
    RuntimeMap
    Remarks

    Calculation of meters-per-unit may differ between implementations. This may have an adverse effect on things such as rendering and measuring depending on the underlying implementation

    If you are certain of the meters-per-unit value required, use the overloaded method that accepts a metersPerUnit parameter.

    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    IMapDefinition mapDef = (IMapDefinition)conn.ResourceService.GetResource("Library://Path/To/My.MapDefinition");
    bool suppressErrors = true;
    RuntimeMap map = mappingSvc.CreateMap(mapDef, suppressErrors);
    | Improve this Doc View Source

    CreateMap(IMapDefinition, Double)

    Creates a new runtime map instance from an existing map definition. Meters per unit is calculated from the Coordinate System WKT of the map definition.

    Declaration
    RuntimeMap CreateMap(IMapDefinition mapDef, double metersPerUnit)
    Parameters
    Type Name Description
    IMapDefinition mapDef
    System.Double metersPerUnit
    Returns
    Type Description
    RuntimeMap
    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    IMapDefinition mapDef = (IMapDefinition)conn.ResourceService.GetResource("Library://Path/To/My.MapDefinition");
    double metersPerUnit = 1.0;
    RuntimeMap map = mappingSvc.CreateMap(mapDef, metersPerUnit);
    | Improve this Doc View Source

    CreateMap(IMapDefinition, Double, Boolean)

    Creates a new runtime map instance from an existing map definition. Meters per unit is calculated from the Coordinate System WKT of the map definition.

    Declaration
    RuntimeMap CreateMap(IMapDefinition mapDef, double metersPerUnit, bool suppressErrors)
    Parameters
    Type Name Description
    IMapDefinition mapDef
    System.Double metersPerUnit
    System.Boolean suppressErrors

    If false, this method will throw an exception on the first layer that cannot be initialized. Otherwise, any exceptions that occur during layer initialization are suppressed

    Returns
    Type Description
    RuntimeMap
    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    IMapDefinition mapDef = (IMapDefinition)conn.ResourceService.GetResource("Library://Path/To/My.MapDefinition");
    double metersPerUnit = 1.0;
    bool suppressErrors = true;
    RuntimeMap map = mappingSvc.CreateMap(mapDef, metersPerUnit, suppressErrors);
    | Improve this Doc View Source

    CreateMap(String, IMapDefinition)

    Creates a new runtime map instance from an existing map definition. Meters per unit is calculated from the Coordinate System WKT of the map definition.

    Declaration
    RuntimeMap CreateMap(string runtimeMapResourceId, IMapDefinition mdf)
    Parameters
    Type Name Description
    System.String runtimeMapResourceId
    IMapDefinition mdf
    Returns
    Type Description
    RuntimeMap
    Remarks

    Calculation of meters-per-unit may differ between implementations. This may have an adverse effect on things such as rendering and measuring depending on the underlying implementation

    If you are certain of the meters-per-unit value required, use the overloaded method that accepts a metersPerUnit parameter.

    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    IMapDefinition mdf = (IMapDefinition)conn.ResourceService.GetResource("Library://Path/To/My.MapDefinition");
    RuntimeMap map = mappingSvc.CreateMap(rtMapId, mdf);
    | Improve this Doc View Source

    CreateMap(String, IMapDefinition, Boolean)

    Creates a new runtime map instance from an existing map definition. Meters per unit is calculated from the Coordinate System WKT of the map definition.

    Declaration
    RuntimeMap CreateMap(string runtimeMapResourceId, IMapDefinition mdf, bool suppressErrors)
    Parameters
    Type Name Description
    System.String runtimeMapResourceId
    IMapDefinition mdf
    System.Boolean suppressErrors

    If false, this method will throw an exception on the first layer that cannot be initialized. Otherwise, any exceptions that occur during layer initialization are suppressed

    Returns
    Type Description
    RuntimeMap
    Remarks

    Calculation of meters-per-unit may differ between implementations. This may have an adverse effect on things such as rendering and measuring depending on the underlying implementation

    If you are certain of the meters-per-unit value required, use the overloaded method that accepts a metersPerUnit parameter.

    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    IMapDefinition mdf = (IMapDefinition)conn.ResourceService.GetResource("Library://Path/To/My.MapDefinition");
    bool suppressErrors = true;
    RuntimeMap map = mappingSvc.CreateMap(rtMapId, mdf, suppressErrors);
    | Improve this Doc View Source

    CreateMap(String, IMapDefinition, Double)

    Creates a new runtime map instance from an existing map definition

    Declaration
    RuntimeMap CreateMap(string runtimeMapResourceId, IMapDefinition mdf, double metersPerUnit)
    Parameters
    Type Name Description
    System.String runtimeMapResourceId
    IMapDefinition mdf
    System.Double metersPerUnit
    Returns
    Type Description
    RuntimeMap
    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    double metersPerUnit = 1.0;
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    IMapDefinition mdf = (IMapDefinition)conn.ResourceService.GetResource("Library://Path/To/My.MapDefinition");
    RuntimeMap map = mappingSvc.CreateMap(rtMapId, mdf, metersPerUnit);
    | Improve this Doc View Source

    CreateMap(String, IMapDefinition, Double, Boolean)

    Creates a new runtime map instance from an existing map definition

    Declaration
    RuntimeMap CreateMap(string runtimeMapResourceId, IMapDefinition mdf, double metersPerUnit, bool suppressErrors)
    Parameters
    Type Name Description
    System.String runtimeMapResourceId
    IMapDefinition mdf
    System.Double metersPerUnit
    System.Boolean suppressErrors

    If false, this method will throw an exception on the first layer that cannot be initialized. Otherwise, any exceptions that occur during layer initialization are suppressed

    Returns
    Type Description
    RuntimeMap
    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    double metersPerUnit = 1.0;
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    IMapDefinition mdf = (IMapDefinition)conn.ResourceService.GetResource("Library://Path/To/My.MapDefinition");
    bool suppressErrors = true;
    RuntimeMap map = mappingSvc.CreateMap(rtMapId, mdf, metersPerUnit, suppressErrors);
    | Improve this Doc View Source

    CreateMap(String, String)

    Creates a new runtime map instance from an existing map definition. Meters per unit is calculated from the Coordinate System WKT of the map definition.

    Declaration
    RuntimeMap CreateMap(string runtimeMapResourceId, string baseMapDefinitionId)
    Parameters
    Type Name Description
    System.String runtimeMapResourceId
    System.String baseMapDefinitionId
    Returns
    Type Description
    RuntimeMap
    Remarks

    Calculation of meters-per-unit may differ between implementations. This may have an adverse effect on things such as rendering and measuring depending on the underlying implementation

    If you are certain of the meters-per-unit value required, use the overloaded method that accepts a metersPerUnit parameter.

    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    string baseMapDefId = "Library://Path/To/My.MapDefinition";
    RuntimeMap map = mappingSvc.CreateMap(rtMapId, baseMapDefId);
    | Improve this Doc View Source

    CreateMap(String, String, Boolean)

    Creates a new runtime map instance from an existing map definition. Meters per unit is calculated from the Coordinate System WKT of the map definition.

    Declaration
    RuntimeMap CreateMap(string runtimeMapResourceId, string baseMapDefinitionId, bool suppressErrors)
    Parameters
    Type Name Description
    System.String runtimeMapResourceId
    System.String baseMapDefinitionId
    System.Boolean suppressErrors

    If false, this method will throw an exception on the first layer that cannot be initialized. Otherwise, any exceptions that occur during layer initialization are suppressed

    Returns
    Type Description
    RuntimeMap
    Remarks

    Calculation of meters-per-unit may differ between implementations. This may have an adverse effect on things such as rendering and measuring depending on the underlying implementation

    If you are certain of the meters-per-unit value required, use the overloaded method that accepts a metersPerUnit parameter.

    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    string baseMapDefId = "Library://Path/To/My.MapDefinition";
    bool suppressErrors = true;
    RuntimeMap map = mappingSvc.CreateMap(rtMapId, baseMapDefId, suppressErrors);
    | Improve this Doc View Source

    CreateMap(String, String, Double)

    Creates a new runtime map instance from an existing map definition

    Declaration
    RuntimeMap CreateMap(string runtimeMapResourceId, string baseMapDefinitionId, double metersPerUnit)
    Parameters
    Type Name Description
    System.String runtimeMapResourceId
    System.String baseMapDefinitionId
    System.Double metersPerUnit
    Returns
    Type Description
    RuntimeMap
    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    string baseMapDefId = "Library://Path/To/My.MapDefinition";
    double metersPerUnit = 1.0;
    RuntimeMap map = mappingSvc.CreateMap(rtMapId, baseMapDefId, metersPerUnit);
    | Improve this Doc View Source

    CreateMap(String, String, Double, Boolean)

    Creates a new runtime map instance from an existing map definition

    Declaration
    RuntimeMap CreateMap(string runtimeMapResourceId, string baseMapDefinitionId, double metersPerUnit, bool suppressErrors)
    Parameters
    Type Name Description
    System.String runtimeMapResourceId
    System.String baseMapDefinitionId
    System.Double metersPerUnit
    System.Boolean suppressErrors

    If false, this method will throw an exception on the first layer that cannot be initialized. Otherwise, any exceptions that occur during layer initialization are suppressed

    Returns
    Type Description
    RuntimeMap
    Examples

    This example shows how to create a new runtime map instance

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    string baseMapDefId = "Library://Path/To/My.MapDefinition";
    double metersPerUnit = 1.0;
    bool suppressErrors = true;
    RuntimeMap map = mappingSvc.CreateMap(rtMapId, baseMapDefId, metersPerUnit, suppressErrors);
    | Improve this Doc View Source

    CreateMapGroup(RuntimeMap, IBaseMapGroup)

    Creates a new runtime map group

    Declaration
    RuntimeMapGroup CreateMapGroup(RuntimeMap parent, IBaseMapGroup group)
    Parameters
    Type Name Description
    RuntimeMap parent

    The parent runtime map. The runtime map must have been created or opened from this same service instance

    IBaseMapGroup group

    The group.

    Returns
    Type Description
    RuntimeMapGroup
    | Improve this Doc View Source

    CreateMapGroup(RuntimeMap, IMapLayerGroup)

    Creates a new runtime map group

    Declaration
    RuntimeMapGroup CreateMapGroup(RuntimeMap parent, IMapLayerGroup group)
    Parameters
    Type Name Description
    RuntimeMap parent

    The parent runtime map. The runtime map must have been created or opened from this same service instance

    IMapLayerGroup group

    The group.

    Returns
    Type Description
    RuntimeMapGroup
    | Improve this Doc View Source

    CreateMapGroup(RuntimeMap, String)

    Creates the map group.

    Declaration
    RuntimeMapGroup CreateMapGroup(RuntimeMap parent, string name)
    Parameters
    Type Name Description
    RuntimeMap parent

    The parent runtime map. The runtime map must have been created or opened from this same service instance

    System.String name

    The name.

    Returns
    Type Description
    RuntimeMapGroup
    | Improve this Doc View Source

    CreateMapLayer(RuntimeMap, ILayerDefinition)

    Creates a new runtime map layer from the specified Layer Definition

    Declaration
    RuntimeMapLayer CreateMapLayer(RuntimeMap parent, ILayerDefinition ldf)
    Parameters
    Type Name Description
    RuntimeMap parent

    The parent runtime map. The runtime map must have been created or opened from this same service instance

    ILayerDefinition ldf

    The layer definition

    Returns
    Type Description
    RuntimeMapLayer
    | Improve this Doc View Source

    CreateMapLayer(RuntimeMap, ILayerDefinition, Boolean)

    Creates a new runtime map layer from the specified Layer Definition

    Declaration
    RuntimeMapLayer CreateMapLayer(RuntimeMap parent, ILayerDefinition ldf, bool suppressErrors)
    Parameters
    Type Name Description
    RuntimeMap parent

    The parent runtime map. The runtime map must have been created or opened from this same service instance

    ILayerDefinition ldf

    The layer definition

    System.Boolean suppressErrors

    If false, this method will throw an exception if the layer cannot be initialized. Otherwise, any exceptions that occur during layer initialization are suppressed

    Returns
    Type Description
    RuntimeMapLayer
    | Improve this Doc View Source

    CreateMapLayer(RuntimeMap, IBaseMapLayer)

    Creates a new runtime map layer from the specified IBaseMapLayer instance

    Declaration
    RuntimeMapLayer CreateMapLayer(RuntimeMap parent, IBaseMapLayer source)
    Parameters
    Type Name Description
    RuntimeMap parent

    The parent runtime map. The runtime map must have been created or opened from this same service instance

    IBaseMapLayer source

    The map definition layer

    Returns
    Type Description
    RuntimeMapLayer
    | Improve this Doc View Source

    CreateMapLayer(RuntimeMap, IBaseMapLayer, Boolean)

    Creates a new runtime map layer from the specified IBaseMapLayer instance

    Declaration
    RuntimeMapLayer CreateMapLayer(RuntimeMap parent, IBaseMapLayer source, bool suppressErrors)
    Parameters
    Type Name Description
    RuntimeMap parent

    The parent runtime map. The runtime map must have been created or opened from this same service instance

    IBaseMapLayer source

    The map definition layer

    System.Boolean suppressErrors

    If false, this method will throw an exception if the layer cannot be initialized. Otherwise, any exceptions that occur during layer initialization are suppressed

    Returns
    Type Description
    RuntimeMapLayer
    | Improve this Doc View Source

    CreateMapLayer(RuntimeMap, IMapLayer)

    Creates a new runtime map layer from the specified IMapLayer instance

    Declaration
    RuntimeMapLayer CreateMapLayer(RuntimeMap parent, IMapLayer source)
    Parameters
    Type Name Description
    RuntimeMap parent

    The parent runtime map. The runtime map must have been created or opened from this same service instance

    IMapLayer source

    The map definition layer

    Returns
    Type Description
    RuntimeMapLayer
    | Improve this Doc View Source

    CreateMapLayer(RuntimeMap, IMapLayer, Boolean)

    Creates a new runtime map layer from the specified IMapLayer instance

    Declaration
    RuntimeMapLayer CreateMapLayer(RuntimeMap parent, IMapLayer source, bool suppressErrors)
    Parameters
    Type Name Description
    RuntimeMap parent

    The parent runtime map. The runtime map must have been created or opened from this same service instance

    IMapLayer source

    The map definition layer

    System.Boolean suppressErrors

    If false, this method will throw an exception if the layer cannot be initialized. Otherwise, any exceptions that occur during layer initialization are suppressed

    Returns
    Type Description
    RuntimeMapLayer
    | Improve this Doc View Source

    GetLegendImageStream(Double, String, Int32, Int32)

    Renders a minature bitmap of the layers style

    Declaration
    Stream GetLegendImageStream(double scale, string layerdefinition, int themeIndex, int type)
    Parameters
    Type Name Description
    System.Double scale

    The scale for the bitmap to match

    System.String layerdefinition

    The layer definition resource id

    System.Int32 themeIndex

    If the layer is themed, this gives the theme index, otherwise set to 0

    System.Int32 type

    The geometry type, 1 for point, 2 for line, 3 for area, 4 for composite

    Returns
    Type Description
    System.IO.Stream

    The legend image stream

    | Improve this Doc View Source

    GetLegendImageStream(Double, String, Int32, Int32, Int32, Int32, String)

    Renders a minature bitmap of the layers style

    Declaration
    Stream GetLegendImageStream(double scale, string layerdefinition, int themeIndex, int type, int width, int height, string format)
    Parameters
    Type Name Description
    System.Double scale

    The scale for the bitmap to match

    System.String layerdefinition

    The layer definition resource id

    System.Int32 themeIndex

    If the layer is themed, this gives the theme index, otherwise set to 0

    System.Int32 type

    The geometry type, 1 for point, 2 for line, 3 for area, 4 for composite

    System.Int32 width

    The width of the image to request.

    System.Int32 height

    The height of the image to request.

    System.String format

    The image format (PNG, JPG or GIF).

    Returns
    Type Description
    System.IO.Stream

    The legend image stream

    | Improve this Doc View Source

    OpenMap(String)

    Opens an existing runtime map instance

    Declaration
    RuntimeMap OpenMap(string runtimeMapResourceId)
    Parameters
    Type Name Description
    System.String runtimeMapResourceId
    Returns
    Type Description
    RuntimeMap
    Examples

    This example shows how to open a RuntimeMap instance from a resource id

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    RuntimeMap map = mappingSvc.OpenMap(rtMapId);
    | Improve this Doc View Source

    QueryMapFeatures(RuntimeMap, Int32, String, Boolean, String, QueryMapOptions, Nullable<Int32>)

    Identifies features that meet the specified spatial selection criteria. These features can be persisted as selected features in a map. This operation is generally used to implement selection/tooltip functionality for a client-side map viewer. QueryMapFeatures returns an XML document describing the set of selected features. If a single feature is selected, the XML contains the tooltip, hyperlink, and properties of the feature.

    Declaration
    string QueryMapFeatures(RuntimeMap map, int maxFeatures, string wkt, bool persist, string selectionVariant, QueryMapOptions extraOptions, int? requestData)
    Parameters
    Type Name Description
    RuntimeMap map

    The RuntimeMap instance

    System.Int32 maxFeatures

    The maximum number of features to return

    System.String wkt

    The WKT of the filter geometry, specifying the selection area

    System.Boolean persist

    Indicates whether the selection should be persisted as part of the map

    System.String selectionVariant

    The spatial operator to use against the selection geometry

    QueryMapOptions extraOptions

    Extra options for controlling selection criteria

    System.Nullable<System.Int32> requestData

    1=Include attributes,2=Include Inline Selection,4=Tooltip Data,8=Include Hyperlink data

    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    RenderDynamicOverlay(RuntimeMap, MapSelection, String)

    Renders a dynamic overlay image of the map

    Declaration
    [Obsolete("Use the version of RenderDynamicOverlay that is not marked Obsolete")]
    Stream RenderDynamicOverlay(RuntimeMap map, MapSelection selection, string format)
    Parameters
    Type Name Description
    RuntimeMap map
    MapSelection selection
    System.String format
    Returns
    Type Description
    System.IO.Stream
    | Improve this Doc View Source

    RenderDynamicOverlay(RuntimeMap, MapSelection, String, Boolean)

    Renders a dynamic overlay image of the map

    Declaration
    [Obsolete("Use the version of RenderDynamicOverlay that is not marked Obsolete")]
    Stream RenderDynamicOverlay(RuntimeMap map, MapSelection selection, string format, bool keepSelection)
    Parameters
    Type Name Description
    RuntimeMap map
    MapSelection selection
    System.String format
    System.Boolean keepSelection
    Returns
    Type Description
    System.IO.Stream
    | Improve this Doc View Source

    RenderDynamicOverlay(RuntimeMap, MapSelection, String, Color, Int32)

    Renders a dynamic overlay image of the map

    Declaration
    Stream RenderDynamicOverlay(RuntimeMap map, MapSelection selection, string format, Color selectionColor, int behaviour)
    Parameters
    Type Name Description
    RuntimeMap map

    The runtime map instance

    MapSelection selection

    The map selection

    System.String format

    The image format

    System.Drawing.Color selectionColor

    The color of the selection

    System.Int32 behaviour

    A bitmask for the rendering behaviour (1 = Render Selection, 2 = Render Layers, 4 = Keep Selection, 8 = Render Base Layers)

    Returns
    Type Description
    System.IO.Stream
    Remarks

    The render base layers bitmask behaviour (8) is only supported from MapGuide Open Source 2.5 onwards

    Examples

    This example shows how to create a render a dynamic overlay image from a map and load it into a System.Drawing.Image

    IServerConnection conn;
    ...
    IMappingService mappingSvc = (IMappingService)conn.GetService((int)ServiceType.Mapping);
    string mapName = "MyMap";
    string rtMapId = "Session:" + conn.SessionID + "//" + mapName + ".Map";
    RuntimeMap map = mappingSvc.OpenMap(rtMapId);
    string format = "PNG";
    Color selectionColor = Color.Blue;
    int behaviour = 1 | 2 | 4;
    using(Stream stream = mappingSvc.RenderDynamicOverlay(map, map.Selection, format, selectionColor, behaviour))
    {
        Image img = Image.FromStream(stream);
    }
    Exceptions
    Type Condition
    System.NotSupportedException

    Thrown if the service is too old to be able to support this API

    | Improve this Doc View Source

    RenderMap(String, Double, Double, Double, Int32, Int32, Int32, String, Boolean, IEnumerable<String>, IEnumerable<String>, IEnumerable<String>, IEnumerable<String>)

    Renders the given map definition in the requested image format

    Declaration
    Stream RenderMap(string mapDefinitionId, double x, double y, double scale, int width, int height, int dpi = 96, string format = "PNG", bool clip = false, IEnumerable<string> showLayers = null, IEnumerable<string> hideLayers = null, IEnumerable<string> showGroups = null, IEnumerable<string> hideGroups = null)
    Parameters
    Type Name Description
    System.String mapDefinitionId
    System.Double x
    System.Double y
    System.Double scale
    System.Int32 width
    System.Int32 height
    System.Int32 dpi
    System.String format
    System.Boolean clip
    System.Collections.Generic.IEnumerable<System.String> showLayers
    System.Collections.Generic.IEnumerable<System.String> hideLayers
    System.Collections.Generic.IEnumerable<System.String> showGroups
    System.Collections.Generic.IEnumerable<System.String> hideGroups
    Returns
    Type Description
    System.IO.Stream
    | Improve this Doc View Source

    RenderMapLegend(RuntimeMap, Int32, Int32, Color, String)

    Renders the legend for the specified RuntimeMap to the requested size and format

    Declaration
    Stream RenderMapLegend(RuntimeMap map, int width, int height, Color backgroundColor, string format)
    Parameters
    Type Name Description
    RuntimeMap map
    System.Int32 width
    System.Int32 height
    System.Drawing.Color backgroundColor
    System.String format
    Returns
    Type Description
    System.IO.Stream
    | Improve this Doc View Source

    RenderRuntimeMap(RuntimeMap, Double, Double, Double, Double, Int32, Int32, Int32)

    Renders the runtime map.

    Declaration
    Stream RenderRuntimeMap(RuntimeMap map, double x1, double y1, double x2, double y2, int width, int height, int dpi)
    Parameters
    Type Name Description
    RuntimeMap map

    The runtime map instance.

    System.Double x1

    The x1.

    System.Double y1

    The y1.

    System.Double x2

    The x2.

    System.Double y2

    The y2.

    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 dpi

    The dpi.

    Returns
    Type Description
    System.IO.Stream
    | Improve this Doc View Source

    RenderRuntimeMap(RuntimeMap, Double, Double, Double, Double, Int32, Int32, Int32, String)

    Renders the runtime map.

    Declaration
    Stream RenderRuntimeMap(RuntimeMap map, double x1, double y1, double x2, double y2, int width, int height, int dpi, string format)
    Parameters
    Type Name Description
    RuntimeMap map

    The runtime map instance.

    System.Double x1

    The x1.

    System.Double y1

    The y1.

    System.Double x2

    The x2.

    System.Double y2

    The y2.

    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 dpi

    The dpi.

    System.String format

    The format.

    Returns
    Type Description
    System.IO.Stream
    | Improve this Doc View Source

    RenderRuntimeMap(RuntimeMap, Double, Double, Double, Double, Int32, Int32, Int32, String, Boolean)

    Renders the runtime map.

    Declaration
    Stream RenderRuntimeMap(RuntimeMap map, double x1, double y1, double x2, double y2, int width, int height, int dpi, string format, bool clip)
    Parameters
    Type Name Description
    RuntimeMap map

    The runtime map

    System.Double x1

    The x1.

    System.Double y1

    The y1.

    System.Double x2

    The x2.

    System.Double y2

    The y2.

    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 dpi

    The dpi.

    System.String format

    The format.

    System.Boolean clip

    if set to true [clip].

    Returns
    Type Description
    System.IO.Stream
    | Improve this Doc View Source

    RenderRuntimeMap(RuntimeMap, Double, Double, Double, Int32, Int32, Int32)

    Renders the runtime map.

    Declaration
    Stream RenderRuntimeMap(RuntimeMap map, double x, double y, double scale, int width, int height, int dpi)
    Parameters
    Type Name Description
    RuntimeMap map

    The runtime map instance

    System.Double x

    The x.

    System.Double y

    The y.

    System.Double scale

    The scale.

    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 dpi

    The dpi.

    Returns
    Type Description
    System.IO.Stream
    | Improve this Doc View Source

    RenderRuntimeMap(RuntimeMap, Double, Double, Double, Int32, Int32, Int32, String)

    Renders the runtime map.

    Declaration
    Stream RenderRuntimeMap(RuntimeMap map, double x, double y, double scale, int width, int height, int dpi, string format)
    Parameters
    Type Name Description
    RuntimeMap map

    The runtime map instance.

    System.Double x

    The x.

    System.Double y

    The y.

    System.Double scale

    The scale.

    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 dpi

    The dpi.

    System.String format

    The format.

    Returns
    Type Description
    System.IO.Stream
    | Improve this Doc View Source

    RenderRuntimeMap(RuntimeMap, Double, Double, Double, Int32, Int32, Int32, String, Boolean)

    Renders the runtime map.

    Declaration
    Stream RenderRuntimeMap(RuntimeMap map, double x, double y, double scale, int width, int height, int dpi, string format, bool clip)
    Parameters
    Type Name Description
    RuntimeMap map

    The runtime map instance.

    System.Double x

    The x.

    System.Double y

    The y.

    System.Double scale

    The scale.

    System.Int32 width

    The width.

    System.Int32 height

    The height.

    System.Int32 dpi

    The dpi.

    System.String format

    The format.

    System.Boolean clip

    if set to true [clip].

    Returns
    Type Description
    System.IO.Stream
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2009 - 2022 Jackie Ng