Interface IMapDefinition
Represents a Map Definition
Inherited Members
Namespace: OSGeo.MapGuide.ObjectModels.MapDefinition
Assembly: OSGeo.MapGuide.ObjectModels.dll
Syntax
public interface IMapDefinition : IResource, IVersionedEntity, ICloneable, IMapDefinitionBase, INotifyPropertyChanged
Properties
| Improve this Doc View SourceBaseMap
Returns the base map section of this map definition. Ensure InitBaseMap() is called first before accessing this property
Declaration
IBaseMapDefinition BaseMap { get; }
Property Value
Type | Description |
---|---|
IBaseMapDefinition |
CoordinateSystem
Gets or sets the coordinate system. Layers whose coordinate system does not match will be re-projected to this coordinate system when rendering
Declaration
string CoordinateSystem { get; set; }
Property Value
Type | Description |
---|---|
System.String | The coordinate system. |
ExtentCalculator
Gets or sets a layer extent calculator
Declaration
ILayerExtentCalculator ExtentCalculator { get; set; }
Property Value
Type | Description |
---|---|
ILayerExtentCalculator |
Extents
Gets or sets the extents.
Declaration
IEnvelope Extents { get; set; }
Property Value
Type | Description |
---|---|
IEnvelope | The extents. |
MapLayer
Gets the map layers.
Declaration
IEnumerable<IMapLayer> MapLayer { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMapLayer> | The map layers. |
MapLayerGroup
Gets the map layer groups.
Declaration
IEnumerable<IMapLayerGroup> MapLayerGroup { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IMapLayerGroup> | The map layer groups. |
Metadata
Gets or sets the metadata.
Declaration
string Metadata { get; set; }
Property Value
Type | Description |
---|---|
System.String | The metadata. |
Name
Gets or sets the name.
Declaration
string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name. |
Methods
| Improve this Doc View SourceAddGroup(String)
Adds the group. The group will be added to the end of the list
Declaration
IMapLayerGroup AddGroup(string groupName)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupName | Name of the group. |
Returns
Type | Description |
---|---|
IMapLayerGroup |
AddLayer(IMapLayer, String, String, String)
Adds a layer to this map. If this is the first layer to be added, the coordinate system of this map and its extents will be set to the coordinate system and extents of this layer if this has not been set already.
Declaration
IMapLayer AddLayer(IMapLayer layerToInsertAbove, string groupName, string layerName, string resourceId)
Parameters
Type | Name | Description |
---|---|---|
IMapLayer | layerToInsertAbove | The layer to insert above in the draw order |
System.String | groupName | The name of the group this layer belongs to. If null or empty, this layer will not belong to any group |
System.String | layerName | The name of this layer. This must be unique |
System.String | resourceId | The layer definition id |
Returns
Type | Description |
---|---|
IMapLayer | The added layer |
AddLayer(String, String, String)
Adds a layer to this map. If this is the first layer to be added, the coordinate system of this map and its extents will be set to the coordinate system and extents of this layer if this has not been set already.
Declaration
IMapLayer AddLayer(string groupName, string layerName, string resourceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | groupName | |
System.String | layerName | |
System.String | resourceId |
Returns
Type | Description |
---|---|
IMapLayer |
Remarks
The layer is added to the beginning of the list. That is, if you called GetIndex(IMapLayer) on your newly added layer, it will return 0. From a display perspective, your newly added layer will be at the top of the map's draw order when you create a runtime map from this map definition
AttachBaseMap(IBaseMapDefinition)
Attaches the given base map section to this map definition. If an existing base map section exists, it is replaced
Declaration
void AttachBaseMap(IBaseMapDefinition baseMap)
Parameters
Type | Name | Description |
---|---|---|
IBaseMapDefinition | baseMap |
GetIndex(IMapLayer)
Gets the index of the specified layer
Declaration
int GetIndex(IMapLayer layer)
Parameters
Type | Name | Description |
---|---|---|
IMapLayer | layer | The layer. |
Returns
Type | Description |
---|---|
System.Int32 |
GetIndex(IMapLayerGroup)
Gets the index of the specified group
Declaration
int GetIndex(IMapLayerGroup group)
Parameters
Type | Name | Description |
---|---|---|
IMapLayerGroup | group |
Returns
Type | Description |
---|---|
System.Int32 |
InitBaseMap()
Initializes the base map section of this map definition. Subsequent calls do nothing, unless you have cleared the section via RemoveBaseMap()
Declaration
void InitBaseMap()
InsertLayer(Int32, IMapLayer)
Inserts the layer at the specified index
Declaration
void InsertLayer(int idx, IMapLayer layer)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | idx | |
IMapLayer | layer |
InsertLayer(Int32, String, String, String)
Inserts a layer into this map at the specified index in the map's layer collection
Declaration
IMapLayer InsertLayer(int index, string groupName, string layerName, string layerDefinitionId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | |
System.String | groupName | |
System.String | layerName | |
System.String | layerDefinitionId |
Returns
Type | Description |
---|---|
IMapLayer |
MoveDown(IMapLayer)
Moves the layer down the draw order.
Declaration
int MoveDown(IMapLayer layer)
Parameters
Type | Name | Description |
---|---|---|
IMapLayer | layer | The layer. |
Returns
Type | Description |
---|---|
System.Int32 | The new index of the moved layer. -1 is returned if the layer does not belong to the map |
MoveDownGroup(IMapLayerGroup)
Moves a Map Group down the presentation order
Declaration
int MoveDownGroup(IMapLayerGroup group)
Parameters
Type | Name | Description |
---|---|---|
IMapLayerGroup | group |
Returns
Type | Description |
---|---|
System.Int32 | The new index of the moved group. -1 is returned if the group does not belong to the map |
MoveUp(IMapLayer)
Moves the layer up the draw order
Declaration
int MoveUp(IMapLayer layer)
Parameters
Type | Name | Description |
---|---|---|
IMapLayer | layer | The layer. |
Returns
Type | Description |
---|---|
System.Int32 | The new index of the moved layer. -1 is returned if the layer does not belong to the map |
MoveUpGroup(IMapLayerGroup)
Moves a Map Group up the presentation order
Declaration
int MoveUpGroup(IMapLayerGroup group)
Parameters
Type | Name | Description |
---|---|---|
IMapLayerGroup | group |
Returns
Type | Description |
---|---|
System.Int32 | The new index of the moved group. -1 is returned if the group does not belong to the map |
RemoveAllGroups()
Removes all dynamic groups from this Map Definition
Declaration
void RemoveAllGroups()
RemoveAllLayers()
Removes all dynamic layers from this Map Definition
Declaration
void RemoveAllLayers()
RemoveBaseMap()
Clears the base map section of this map definition. If you want to rebuild this section, ensure InitBaseMap() is called
Declaration
void RemoveBaseMap()
RemoveGroup(IMapLayerGroup)
Removes the group
Declaration
void RemoveGroup(IMapLayerGroup group)
Parameters
Type | Name | Description |
---|---|---|
IMapLayerGroup | group |
RemoveLayer(IMapLayer)
Removes the layer.
Declaration
void RemoveLayer(IMapLayer layer)
Parameters
Type | Name | Description |
---|---|---|
IMapLayer | layer | The layer. |
SetBottomDrawOrder(IMapLayer)
Moves the specified layer to the bottom of the draw order
Declaration
void SetBottomDrawOrder(IMapLayer layer)
Parameters
Type | Name | Description |
---|---|---|
IMapLayer | layer |
SetExtents(Double, Double, Double, Double)
Sets the extents.
Declaration
void SetExtents(double minx, double miny, double maxx, double maxy)
Parameters
Type | Name | Description |
---|---|---|
System.Double | minx | The minx. |
System.Double | miny | The miny. |
System.Double | maxx | The maxx. |
System.Double | maxy | The maxy. |
SetTopDrawOrder(IMapLayer)
Moves the specified layer to the top of the draw order
Declaration
void SetTopDrawOrder(IMapLayer layer)
Parameters
Type | Name | Description |
---|---|---|
IMapLayer | layer |