Search Results for

    Show / Hide Table of Contents

    Class MapLayer

    Represents a map layer.

    Inheritance
    System.Object
    Base
    MapLayer
    Implements
    IFRSerializable
    IParent
    Inherited Members
    Base.Name
    Base.Restrictions
    Base.Flags
    Base.Parent
    Base.BaseName
    Base.ClassName
    Base.Report
    Base.Page
    Base.ChildObjects
    Base.AllObjects
    Base.ZOrder
    Base.IsAncestor
    Base.IsDesigning
    Base.IsPrinting
    Base.IsRunning
    Base.OriginalComponent
    Base.Disposed
    Base.SetProp(Base, Base)
    Base.FloatDiff(Single, Single)
    Base.DeserializeSubItems(FRReader)
    Base.ExtractDefaultMacros(String)
    Base.Dispose(Boolean)
    Base.Dispose()
    Base.SetFlags(Flags, Boolean)
    Base.SetReport(Report)
    Base.SetName(String)
    Base.SetParent(Base)
    Base.SetParentCore(Base)
    Base.FindObject(String)
    Base.CreateUniqueName()
    Base.Clear()
    Base.Deserialize(FRReader)
    Base.BaseAssign(Base)
    Base.AssignAll(Base)
    Base.HasParent(Base)
    Base.HasFlag(Flags)
    Base.HasRestriction(Restrictions)
    Base.InvokeEvent(String, Object)
    Base.GetCustomScript()
    Base.ExtractMacros()
    Base.IsHaveToConvert(Object)
    Base.GetConvertedObjects()
    Base.ForEachAllConvectedObjects(Object)
    FastReport.Base.IsSelected
    FastReport.Base.IsParentSelected
    FastReport.Base.Delete()
    FastReport.Base.OnBeforeInsert(System.Int32)
    FastReport.Base.OnAfterInsert(FastReport.InsertFrom)
    FastReport.Base.SelectionChanged()
    FastReport.Base.GetContextMenu()
    FastReport.Base.GetImageIndex()
    Namespace: FastReport.Map
    Assembly: FastReport.dll
    Syntax
    public class MapLayer : Base, IDisposable, IFRSerializable, IParent, ICustomTypeDescriptor

    Constructors

    MapLayer()

    Initializes a new instance of the MapLayer class.

    Declaration
    public MapLayer()

    Properties

    Accuracy

    Gets or sets the map accuracy. Lower value is better, but slower.

    Declaration
    public float Accuracy { get; set; }
    Property Value
    Type Description
    System.Single

    AnalyticalValue

    Gets or sets an expression that returns analytical value.

    Declaration
    public string AnalyticalValue { get; set; }
    Property Value
    Type Description
    System.String

    Box

    Gets or sets a bounding box of layer.

    Declaration
    [Browsable(false)]
    public BoundingBox Box { get; set; }
    Property Value
    Type Description
    BoundingBox

    BoxAsString

    Gets or sets the bounding box as a string.

    Declaration
    [Browsable(false)]
    public string BoxAsString { get; set; }
    Property Value
    Type Description
    System.String

    ColorRanges

    Gets the color ranges used to highlight shapes based on analytical value.

    Declaration
    public ColorRanges ColorRanges { get; }
    Property Value
    Type Description
    ColorRanges

    DataSource

    Gets or sets the data source.

    Declaration
    public DataSourceBase DataSource { get; set; }
    Property Value
    Type Description
    DataSourceBase

    DefaultShapeStyle

    Gets the default style of shapes in this layer.

    Declaration
    public ShapeStyle DefaultShapeStyle { get; }
    Property Value
    Type Description
    ShapeStyle

    Filter

    Gets or sets the datasource filter expression.

    Declaration
    public string Filter { get; set; }
    Property Value
    Type Description
    System.String

    Function

    Gets or sets the aggregate function.

    Declaration
    public TotalType Function { get; set; }
    Property Value
    Type Description
    TotalType

    LabelColumn

    Gets or sets label's column name.

    Declaration
    public string LabelColumn { get; set; }
    Property Value
    Type Description
    System.String

    LabelFormat

    Gets or sets the format of label's value.

    Declaration
    public string LabelFormat { get; set; }
    Property Value
    Type Description
    System.String

    LabelKind

    Gets or sets a value that determines how map labels are displayed.

    Declaration
    public MapLabelKind LabelKind { get; set; }
    Property Value
    Type Description
    MapLabelKind

    LabelsVisibleAtZoom

    Gets or sets the value that determines the labels visiblity at a certain zoom value.

    Declaration
    public float LabelsVisibleAtZoom { get; set; }
    Property Value
    Type Description
    System.Single

    LabelValue

    Gets or sets an expression that returns label value.

    Declaration
    public string LabelValue { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This property is used if the SpatialSource is set to ApplicationData.

    LatitudeValue

    Gets or sets an expression that returns latitude value.

    Declaration
    public string LatitudeValue { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This property is used if the SpatialSource is set to ApplicationData.

    LongitudeValue

    Gets or sets an expression that returns longitude value.

    Declaration
    public string LongitudeValue { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This property is used if the SpatialSource is set to ApplicationData.

    Map

    Gets a reference to the Map object.

    Declaration
    [Browsable(false)]
    public MapObject Map { get; }
    Property Value
    Type Description
    MapObject

    Palette

    Gets or sets the palette used to highlight shapes.

    Declaration
    public MapPalette Palette { get; set; }
    Property Value
    Type Description
    MapPalette

    Shapefile

    Gets or sets the name of ESRI shapefile.

    Declaration
    public string Shapefile { get; set; }
    Property Value
    Type Description
    System.String

    Shapes

    Gets a collection of map objects.

    Declaration
    [Browsable(false)]
    public ShapeCollection Shapes { get; }
    Property Value
    Type Description
    ShapeCollection

    SizeRanges

    Gets the size ranges used to draw points based on analytical value.

    Declaration
    public SizeRanges SizeRanges { get; }
    Property Value
    Type Description
    SizeRanges

    SpatialColumn

    Gets or sets spatial column name.

    Declaration
    public string SpatialColumn { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This property is used if the SpatialSource is set to ShpFile.

    SpatialSource

    Gets or sets the spatial source for the layer.

    Declaration
    public SpatialSource SpatialSource { get; set; }
    Property Value
    Type Description
    SpatialSource

    SpatialValue

    Gets or sets an expression that returns spatial value.

    Declaration
    public string SpatialValue { get; set; }
    Property Value
    Type Description
    System.String
    Remarks

    This property is used if the SpatialSource is set to ShpFile.

    Type

    Gets or sets a type of layer.

    Declaration
    [Browsable(false)]
    public LayerType Type { get; set; }
    Property Value
    Type Description
    LayerType

    Visible

    Gets or sets a value indicating that the layer is visible.

    Declaration
    public bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    ZoomPolygon

    Gets or sets the expression that returns the name of polygon to zoom.

    Declaration
    public string ZoomPolygon { get; set; }
    Property Value
    Type Description
    System.String

    Methods

    AddChild(Base)

    Adds a child object to this object's childs.

    Declaration
    public void AddChild(Base child)
    Parameters
    Type Name Description
    Base child

    Object to add.

    AddValue(Double, Double, String, Double)

    Adds application provided data.

    Declaration
    public void AddValue(double latitude, double longitude, string name, double analyticalValue)
    Parameters
    Type Name Description
    System.Double latitude

    Latitude value.

    System.Double longitude

    Longitude value.

    System.String name

    The name displayed as a label.

    System.Double analyticalValue

    Analytical value.

    Remarks

    Use this method if the SpatialSource is set to ApplicationData.

    AddValue(String, Double)

    Adds a spatial/analytical value pair to the list.

    Declaration
    public void AddValue(string spatialValue, double analyticalValue)
    Parameters
    Type Name Description
    System.String spatialValue

    The spatial value.

    System.Double analyticalValue

    The analytical value.

    Remarks

    Use this method if the SpatialSource is set to ShpFile.

    Assign(Base)

    Copies the contents of another, similar object.

    Declaration
    public override void Assign(Base source)
    Parameters
    Type Name Description
    Base source

    Source object to copy the contents from.

    Overrides
    Base.Assign(Base)
    Remarks

    Call Assign to copy the properties from another object of the same type. The standard form of a call to Assign is

    destination.Assign(source);

    which tells the destination object to copy the contents of the source object to itself. In this method, all child objects are ignored. If you want to copy child objects, use the AssignAll method.

    See Also
    AssignAll(Base)

    CanContain(Base)

    Gets a value indicating that this object can contain the specified child object.

    Declaration
    public bool CanContain(Base child)
    Parameters
    Type Name Description
    Base child

    Child object.

    Returns
    Type Description
    System.Boolean

    true if this object can contain the specified child object; otherwise, false.

    CreateUniqueNames()

    Creates unique names for all contained objects such as points, lines, polygons, etc.

    Declaration
    public void CreateUniqueNames()

    Draw(FRPaintEventArgs)

    Draws the layer.

    Declaration
    public void Draw(FRPaintEventArgs e)
    Parameters
    Type Name Description
    FRPaintEventArgs e

    The drawing parameters.

    GetAttributes()

    Declaration
    public AttributeCollection GetAttributes()
    Returns
    Type Description
    System.ComponentModel.AttributeCollection

    GetChildObjects(ObjectCollection)

    Gets a list of child objects.

    Declaration
    public void GetChildObjects(ObjectCollection list)
    Parameters
    Type Name Description
    ObjectCollection list

    List to fill with values.

    GetChildOrder(Base)

    Returns z-order of the specified child object.

    Declaration
    public int GetChildOrder(Base child)
    Parameters
    Type Name Description
    Base child

    Child object.

    Returns
    Type Description
    System.Int32

    Z-order of the specified object.

    Remarks

    This method must return the index of a specified child object in the internal child list.

    GetClassName()

    Declaration
    public string GetClassName()
    Returns
    Type Description
    System.String

    GetComponentName()

    Declaration
    public string GetComponentName()
    Returns
    Type Description
    System.String

    GetConverter()

    Declaration
    public TypeConverter GetConverter()
    Returns
    Type Description
    System.ComponentModel.TypeConverter

    GetDefaultEvent()

    Declaration
    public EventDescriptor GetDefaultEvent()
    Returns
    Type Description
    System.ComponentModel.EventDescriptor

    GetDefaultProperty()

    Declaration
    public PropertyDescriptor GetDefaultProperty()
    Returns
    Type Description
    System.ComponentModel.PropertyDescriptor

    GetEditor(Type)

    Declaration
    public object GetEditor(Type editorBaseType)
    Parameters
    Type Name Description
    System.Type editorBaseType
    Returns
    Type Description
    System.Object

    GetEvents()

    Declaration
    public EventDescriptorCollection GetEvents()
    Returns
    Type Description
    System.ComponentModel.EventDescriptorCollection

    GetEvents(Attribute[])

    Declaration
    public EventDescriptorCollection GetEvents(Attribute[] attributes)
    Parameters
    Type Name Description
    System.Attribute[] attributes
    Returns
    Type Description
    System.ComponentModel.EventDescriptorCollection

    GetExpressions()

    Gets all expressions contained in the object.

    Declaration
    public override string[] GetExpressions()
    Returns
    Type Description
    System.String[]

    Array of expressions or null if object contains no expressions.

    Overrides
    Base.GetExpressions()
    Remarks

    Do not call this method directly. You may override it if you are developing a new component for FastReport.

    This method is called by FastReport each time before run a report. FastReport do this to collect all expressions and compile them. For example, GetExpressions method of the TextObject class parses the text and returns all expressions found in the text.

    GetProperties()

    Declaration
    public PropertyDescriptorCollection GetProperties()
    Returns
    Type Description
    System.ComponentModel.PropertyDescriptorCollection

    GetProperties(Attribute[])

    Declaration
    public PropertyDescriptorCollection GetProperties(Attribute[] attr)
    Parameters
    Type Name Description
    System.Attribute[] attr
    Returns
    Type Description
    System.ComponentModel.PropertyDescriptorCollection

    GetPropertyOwner(PropertyDescriptor)

    Declaration
    public object GetPropertyOwner(PropertyDescriptor pd)
    Parameters
    Type Name Description
    System.ComponentModel.PropertyDescriptor pd
    Returns
    Type Description
    System.Object

    HitTest(PointF)

    Finds the shape under cursor.

    Declaration
    public ShapeBase HitTest(PointF point)
    Parameters
    Type Name Description
    System.Drawing.PointF point

    The cursor coordinates.

    Returns
    Type Description
    ShapeBase

    The ShapeBase object if found.

    LoadShapefile(String)

    Loads the layer contents from ESRI shapefile (.shp/.dbf).

    Declaration
    public void LoadShapefile(string fileName)
    Parameters
    Type Name Description
    System.String fileName

    The file name.

    OnAfterLoad()

    Called after all report objects were loaded.

    Declaration
    public override void OnAfterLoad()
    Overrides
    Base.OnAfterLoad()
    Remarks

    Do not call this method directly. You may override it if you are developing a new component for FastReport.

    RemoveChild(Base)

    Removes a specified object from this object's childs.

    Declaration
    public void RemoveChild(Base child)
    Parameters
    Type Name Description
    Base child

    Serialize(FRWriter)

    Serializes the object.

    Declaration
    public override void Serialize(FRWriter writer)
    Parameters
    Type Name Description
    FRWriter writer

    Writer object.

    Overrides
    Base.Serialize(FRWriter)
    Remarks

    Do not call this method directly. You should override it if you are developing a new component for FastReport.

    This method is called when the object needs to save the state. It may happen when:

    • saving the report to the file or stream;
    • saving the report to the designer's undo buffer;
    • assigning the object to another object using the Assign(Base) or AssignAll methods;
    • saving the object to the designer's clipboard;
    • saving the object to the preview (when run a report).

    SetChildOrder(Base, Int32)

    Sets the z-order of the specified object.

    Declaration
    public void SetChildOrder(Base child, int order)
    Parameters
    Type Name Description
    Base child

    Child object.

    System.Int32 order

    New Z-order.

    Remarks

    This method must place the specified child object at the specified position in the internal child list.

    Simplify(Double)

    Reduces the number of points in the shapes in this layer.

    Declaration
    public void Simplify(double accuracy)
    Parameters
    Type Name Description
    System.Double accuracy

    The accuracy value.

    UpdateLayout(Single, Single)

    Updates the children layout when the size of this object is changed by dx, dy values.

    Declaration
    public void UpdateLayout(float dx, float dy)
    Parameters
    Type Name Description
    System.Single dx

    X delta.

    System.Single dy

    Y delta.

    Remarks

    This method must update positions/sizes of child objects whose Dock or Anchor properties are set to non-default values.

    Implements

    IFRSerializable
    IParent
    Back to top © 1998-2025 Copyright Fast Reports Inc.