#region Disclaimer / License // Copyright (C) 2013, Jackie Ng // http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie@gmail.com // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA // #endregion using OSGeo.MapGuide.ObjectModels.Common; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace OSGeo.MapGuide.ObjectModels.RuntimeMap { /// /// Describes the structure of a Runtime Map /// public interface IRuntimeMapInfo { /// /// Gets the site version of the MapGuide Server /// string SiteVersion { get; } /// /// Gets the name of the runtime map. This combined with the session ID provides the /// means for any code using the MapGuide API to open an existing MgMap instance /// string Name { get; } /// /// Gets the Map Definition resource ID used to create this runtime map /// string MapDefinition { get; } /// /// Gets the background color /// string BackgroundColor { get; } /// /// Gets the display DPI of the map /// int DisplayDpi { get; } /// /// Gets the mime type of any inline icons. /// /// /// If the application did not request any icons as part of the CreateRuntimeMap /// or DescribeRuntimeMap request, this property is null /// string IconMimeType { get; } /// /// Gets the coordinate system of this map /// ICoordinateSystemInfo CoordinateSystem { get; } /// /// Gets the bounding box of this map /// IEnvelope Extents { get; } /// /// Gets the layers of this map. /// /// /// If the application did not request layer structure as part of the CreateRuntimeMap /// or DescribeRuntimeMap request, this property will be an empty collection /// IRuntimeLayerInfoCollection Layers { get; } /// /// Gets the groups of this map. /// /// /// Even if the application did not request layer structure as part of the CreateRuntimeMap /// or DescribeRuntimeMap request, this property will still contain any Base Layer Groups /// if defined in the Map Definition /// IRuntimeLayerGroupInfoCollection Groups { get; } /// /// Gets the finite display scales defined for this runtime map /// double[] FiniteDisplayScales { get; } } /// /// Represents coordinate system information for a Runtime Map /// public interface ICoordinateSystemInfo { /// /// Gets the WKT of this coordinate system /// string Wkt { get; } /// /// Gets the CS-Map coordinate system code of this coordinate system /// string MentorCode { get; } /// /// Gets the EPSG code of this coordinate system /// string EpsgCode { get; } /// /// Gets the meters-per-unit value of this runtime map. This value is essential for /// any tile or rendering functionality /// double MetersPerUnit { get; } } /// /// Models a legend element /// public interface IRuntimeMapLegendElement { /// /// Gets the name of the element /// string Name { get; } /// /// Gets the label of the element /// string LegendLabel { get; } /// /// Gets the unique id of the element /// string ObjectID { get; } /// /// Gets the unique id of the element's parent /// string ParentID { get; } /// /// Gets whether the element will be shown in the legend /// bool DisplayInLegend { get; } /// /// Gets whether the element will be expanded in the legend /// bool ExpandInLegend { get; } /// /// Gets whether the element is potentially /// bool Visible { get; } /// /// Gets whether the element is actually element /// bool ActuallyVisible { get; } } /// /// Represents a layer of the runtime map /// public interface IRuntimeLayerInfo : IRuntimeMapLegendElement { /// /// Gets the type of layer /// int LayerType { get; } /// /// Gets the Layer Definition ID /// string LayerDefinition { get; } /// /// Gets feature source information of the layer /// IFeatureSourceInfo FeatureSource { get; } /// /// Gets information about the scale ranges in the layer /// IScaleRangeInfoCollection ScaleRanges { get; } } /// /// Represents Feature Source information for a layer /// public interface IFeatureSourceInfo { /// /// Gets the resource id of the Feature Source /// string ResourceID { get; } /// /// Gets the name of the feature class that the layer is rendered from /// string ClassName { get; } /// /// Gets the name of the geometry property of the feature class that the layer is rendered from /// string Geometry { get; } } /// /// Represents a group of a runtime map /// public interface IRuntimeLayerGroupInfo : IRuntimeMapLegendElement { /// /// Gets the type of the group /// int GroupType { get; } } /// /// Represents a scale range of a layer /// public interface IScaleRangeInfo { /// /// Gets the minimum scale this scale range is applicable for /// double MinScale { get; } /// /// Gets the maximum scale this scale range is applicable for /// double MaxScale { get; } /// /// Gets the feature styles for this scale range /// IFeatureStyleInfoCollection FeatureStyle { get; } } /// /// Represents a feature style /// public interface IFeatureStyleInfo { /// /// Gets the type of the feature style /// int Type { get; } /// /// Gets the style rules for this feature style /// IRuleInfoCollection Rules { get; } } /// /// Represents a style rule /// public interface IRuleInfo { /// /// Gets the legend label for this rule /// string LegendLabel { get; } /// /// Gets the filter for this rule /// string Filter { get; } /// /// Gets the icon for this rule /// string IconBase64 { get; } } /// /// A generic read-only collection interface /// /// public interface IReadOnlyCollection : IEnumerable { /// /// Gets the number of items in this collection /// int Count { get; } /// /// Gets the item at the given index /// /// /// T this[int index] { get; } } /// /// A collection of layers /// public interface IRuntimeLayerInfoCollection : IReadOnlyCollection { } /// /// A collection of groups /// public interface IRuntimeLayerGroupInfoCollection : IReadOnlyCollection { } /// /// A collection of scale ranges /// public interface IScaleRangeInfoCollection : IReadOnlyCollection { } /// /// A collection of feature styles /// public interface IFeatureStyleInfoCollection : IReadOnlyCollection { } /// /// A collection of style rules /// public interface IRuleInfoCollection : IReadOnlyCollection { } }