Class ExtensionMethods
Extension methods
Inheritance
Inherited Members
Namespace: OSGeo.MapGuide.ObjectModels.TileSetDefinition
Assembly: OSGeo.MapGuide.ObjectModels.dll
Syntax
public static class ExtensionMethods
Methods
| Improve this Doc View SourceGetBaseLayerByName(ITileSetAbstract, String)
Gets the base layer of the specified name
Declaration
public static IBaseMapLayer GetBaseLayerByName(this ITileSetAbstract map, string layerName)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
System.String | layerName | The layer name |
Returns
Type | Description |
---|---|
IBaseMapLayer | The base layer |
GetBaseLayerCount(ITileSetAbstract)
Gets the number of base layers
Declaration
public static int GetBaseLayerCount(this ITileSetAbstract map)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
Returns
Type | Description |
---|---|
System.Int32 | The count |
GetDefaultCoordinateSystem(ITileSetDefinition)
Gets the coordinate system of this tile set. Must be using the default tile provider
Declaration
public static string GetDefaultCoordinateSystem(this ITileSetDefinition tileSet)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
Returns
Type | Description |
---|---|
System.String | The coordinate system |
GetDefaultFiniteScaleList(ITileSetDefinition)
Gets the finite scale list of this tile set. Must be using the default tile provider.
Declaration
public static double[] GetDefaultFiniteScaleList(this ITileSetDefinition tileSet)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
Returns
Type | Description |
---|---|
System.Double[] | The array of finite scales |
GetDefaultTileHeight(ITileSetDefinition)
Gets the height of this tile set. Must be using the default tile provider.
Declaration
public static int? GetDefaultTileHeight(this ITileSetDefinition tileSet)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> | The height of this tile set |
GetDefaultTileWidth(ITileSetDefinition)
Gets the width of this tile set. Must be using the default tile provider.
Declaration
public static int? GetDefaultTileWidth(this ITileSetDefinition tileSet)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
Returns
Type | Description |
---|---|
System.Nullable<System.Int32> | The width of this tile set |
GetFirstGroup(ITileSetAbstract)
Gets the first base map group
Declaration
public static IBaseMapGroup GetFirstGroup(this ITileSetAbstract map)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
Returns
Type | Description |
---|---|
IBaseMapGroup | The first base map group |
GetGroup(ITileSetAbstract, String)
Gets the base map group of the specified name
Declaration
public static IBaseMapGroup GetGroup(this ITileSetAbstract map, string groupName)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
System.String | groupName | The group name |
Returns
Type | Description |
---|---|
IBaseMapGroup | The base map group |
GetGroupForLayer(ITileSetAbstract, IBaseMapLayer)
Gets the parent group for the specified layer
Declaration
public static IBaseMapGroup GetGroupForLayer(this ITileSetAbstract map, IBaseMapLayer layer)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
IBaseMapLayer | layer | The layer |
Returns
Type | Description |
---|---|
IBaseMapGroup | The parent group |
GetLayersForGroup(ITileSetAbstract, String)
Gets the tiled layers for the specified base map group
Declaration
public static IEnumerable<IBaseMapLayer> GetLayersForGroup(this ITileSetAbstract map, string groupName)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
System.String | groupName | The group name |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IBaseMapLayer> | The tiled layers |
GetMaxScale(ITileSetAbstract)
Gets the maximum finite display scale
Declaration
public static double GetMaxScale(this ITileSetAbstract map)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
Returns
Type | Description |
---|---|
System.Double | The maximum scale |
GetMinScale(ITileSetAbstract)
Gets the minimum finite display scale
Declaration
public static double GetMinScale(this ITileSetAbstract map)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
Returns
Type | Description |
---|---|
System.Double | The minimum scale |
GetParameter(ITileSetDefinition, String)
Gets the tile set parameter of the specified name
Declaration
public static INameStringPair GetParameter(this ITileSetDefinition tileSet, string name)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.String | name | The name |
Returns
Type | Description |
---|---|
INameStringPair | The parameter |
GetTileFormat(ITileSetDefinition)
Gets the image format of this tile set
Declaration
public static string GetTileFormat(this ITileSetDefinition tileSet)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
Returns
Type | Description |
---|---|
System.String | The image format |
GetTilePath(ITileSetDefinition)
Gets the tile path of this tile set
Declaration
public static string GetTilePath(this ITileSetDefinition tileSet)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
Returns
Type | Description |
---|---|
System.String | The tile path |
GroupExists(ITileSetAbstract, String)
Gets whether the specified base map group exists
Declaration
public static bool GroupExists(this ITileSetAbstract map, string groupName)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
System.String | groupName | The group name |
Returns
Type | Description |
---|---|
System.Boolean | True if it exists. False otherwise |
GroupExists(ITileSetDefinition, String)
Gets whether the specified base group exists in the tile set
Declaration
public static bool GroupExists(this ITileSetDefinition tileSet, string groupName)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.String | groupName | The group name |
Returns
Type | Description |
---|---|
System.Boolean | True if the group exists. False otherwise |
HasGroups(ITileSetAbstract)
Gets whether this base map has groups
Declaration
public static bool HasGroups(this ITileSetAbstract map)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
Returns
Type | Description |
---|---|
System.Boolean | True if it has groups. False otherwise |
HasLayers(IBaseMapGroup)
Gets whether this base map group has tiled layers
Declaration
public static bool HasLayers(this IBaseMapGroup grp)
Parameters
Type | Name | Description |
---|---|---|
IBaseMapGroup | grp | The group |
Returns
Type | Description |
---|---|
System.Boolean | True if it has tiled layers. False otherwise |
HasLayers(ITileSetAbstract)
Gets whether this base map has tiled layers
Declaration
public static bool HasLayers(this ITileSetAbstract map)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
Returns
Type | Description |
---|---|
System.Boolean | True if it has tiled layers. False otherwise |
LayerExists(ITileSetAbstract, String)
Gets whether a base layer of the specified name exists.
Declaration
public static bool LayerExists(this ITileSetAbstract map, string layerName)
Parameters
Type | Name | Description |
---|---|---|
ITileSetAbstract | map | The map |
System.String | layerName | The layer name |
Returns
Type | Description |
---|---|
System.Boolean | True if it exists. False otherwise |
RemoveBaseLayerGroup(ITileSetDefinition, IBaseMapGroup)
Removes the given base layer group from the Map Definition
Declaration
public static void RemoveBaseLayerGroup(this ITileSetDefinition map, IBaseMapGroup group)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | map | The map |
IBaseMapGroup | group | The group to remove |
SetDefaultCoordinateSystem(ITileSetDefinition, String)
Sets the coordinate system of this tile set. Must be using the default tile provider.
Declaration
public static void SetDefaultCoordinateSystem(this ITileSetDefinition tileSet, string coordinateSystem)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.String | coordinateSystem | The coordinate system |
SetDefaultFiniteScaleList(ITileSetDefinition, IEnumerable<Double>)
Sets the finite scale list of this tile set. Must be using the default tile provider.
Declaration
public static void SetDefaultFiniteScaleList(this ITileSetDefinition tileSet, IEnumerable<double> scales)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.Collections.Generic.IEnumerable<System.Double> | scales | The finite sclae list |
SetDefaultProviderParameters(ITileSetDefinition, Int32, Int32, String, Double[], String, String)
Sets default provider parameters. Any existing parameters are cleared
Declaration
public static void SetDefaultProviderParameters(this ITileSetDefinition tileSet, int tileWidth, int tileHeight, string coordinateSystem, double[] finiteScaleList, string tileFormat = "PNG", string tilePath = "%MG_TILE_CACHE_PATH%")
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.Int32 | tileWidth | Tile width |
System.Int32 | tileHeight | Tile height |
System.String | coordinateSystem | Coordinate system |
System.Double[] | finiteScaleList | The finite scale list |
System.String | tileFormat | Image format |
System.String | tilePath | Tile path |
SetDefaultTileHeight(ITileSetDefinition, Int32)
Sets the height of this tile set. Must be using the default tile provider.
Declaration
public static void SetDefaultTileHeight(this ITileSetDefinition tileSet, int value)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.Int32 | value | The height |
SetDefaultTileWidth(ITileSetDefinition, Int32)
Sets the width of this tile set. Must be using the default tile provider.
Declaration
public static void SetDefaultTileWidth(this ITileSetDefinition tileSet, int value)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.Int32 | value | The width of this tile set |
SetTileFormat(ITileSetDefinition, String)
Sets the image format of this tile set
Declaration
public static void SetTileFormat(this ITileSetDefinition tileSet, string format)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.String | format | The image format |
SetTilePath(ITileSetDefinition, String)
Sets the path of this tile set
Declaration
public static void SetTilePath(this ITileSetDefinition tileSet, string path)
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.String | path | The tile path |
SetXYZProviderParameters(ITileSetDefinition, String, String)
Sets XYZ provider parameters. Any existing parameters are cleared
Declaration
public static void SetXYZProviderParameters(this ITileSetDefinition tileSet, string tileFormat = "PNG", string tilePath = "%MG_TILE_CACHE_PATH%")
Parameters
Type | Name | Description |
---|---|---|
ITileSetDefinition | tileSet | The tile set |
System.String | tileFormat | The image format |
System.String | tilePath | The tile path |