Table of Contents

Class Map

Namespace
LightningChartLib.WinForms.Charting.Maps
Assembly
LightningChart.WinForms.Charting.NET4.dll

Map data container.

[TypeConverter(typeof(ExpandableObjectConverter))]
public class Map : ChartNode, IChartNode, IDisposable
Inheritance
Map
Implements
Inherited Members

Constructors

Map()

Constructor.

public Map()

Map(IChartNode, AxisX, AxisY)

Constructor.

public Map(IChartNode owner, AxisX axisX, AxisY axisY)

Parameters

owner IChartNode

Parent.

axisX AxisX

X-axis to bind the map to.

axisY AxisY

Y-axis to bind the map to.

Properties

AllowUserInteraction

Allow user interaction.

public bool AllowUserInteraction { get; set; }

Property Value

bool

Backgrounds

Map backgrounds.

public MapBackgroundList Backgrounds { get; set; }

Property Value

MapBackgroundList

CityOptions

City draw options.

public CityOptions CityOptions { get; set; }

Property Value

CityOptions

Description

Map description.

public string Description { get; }

Property Value

string

FileName

Map file name. Use with Path value to indicate map file.

public string FileName { get; set; }

Property Value

string

Highlight

Highlight map item when user interactive device over.

public Highlight Highlight { get; set; }

Property Value

Highlight

LakeOptions

Lake draw options.

public RegionOptions LakeOptions { get; set; }

Property Value

RegionOptions

LandOptions

Land draw options.

public RegionOptions LandOptions { get; set; }

Property Value

RegionOptions

Layers

Map layers.

public MapLayer[] Layers { get; }

Property Value

MapLayer[]

Names

Internal area name list.

public List<MapHeader> Names { get; }

Property Value

List<MapHeader>

Optimization

Rendering optimization.

public Map.RenderingOptimization Optimization { get; set; }

Property Value

Map.RenderingOptimization

OtherOptions

Other map type draw options.

public RegionOptions OtherOptions { get; set; }

Property Value

RegionOptions

OverlapLabels

Show all labels, even if they overlap each other.

public bool OverlapLabels { get; set; }

Property Value

bool

Path

Map folder.

public string Path { get; set; }

Property Value

string

RenderIntensitySeriesBeforeLayerIndex

Layer index before intensity series will be drawn. Use -1 to draw intensity series after all map layers.

public int RenderIntensitySeriesBeforeLayerIndex { get; set; }

Property Value

int

RiverOptions

River options.

public LineOptions RiverOptions { get; set; }

Property Value

LineOptions

RoadOptions

Road options.

public LineOptions RoadOptions { get; set; }

Property Value

LineOptions

SimpleHighlightColor

Simple highlight map item color when user interactive device is over.

public Color SimpleHighlightColor { get; set; }

Property Value

Color

TileCacheFolder

Tile cache folder.

public string TileCacheFolder { get; set; }

Property Value

string

TileLayers

Map tile layers.

public TileLayerList TileLayers { get; set; }

Property Value

TileLayerList

Type

Map type.

public Map.MapType Type { get; set; }

Property Value

Map.MapType

UserInteractiveDeviceOverMapItemLayer

Layer index of item on which user interactive device is.

public int UserInteractiveDeviceOverMapItemLayer { get; }

Property Value

int

XAxisIndex

Index of X axis related to map.

public int XAxisIndex { get; set; }

Property Value

int

YAxisIndex

Index of Y axis related to map.

public int YAxisIndex { get; set; }

Property Value

int

Methods

Center(MapItem)

Center on map item.

public void Center(MapItem mapItem)

Parameters

mapItem MapItem

Map item.

Center(float, float)

Center on coordinates.

public void Center(float longitude, float latitude)

Parameters

longitude float

Longitude.

latitude float

Latitude.

ClearTileCacheFolder()

Clears tile cache folder.

public void ClearTileCacheFolder()

Dispose(bool)

Clean up any resources being used.

protected override void Dispose(bool disposing)

Parameters

disposing bool

true if managed resources should be disposed, otherwise false.

Fit()

Show whole map.

public void Fit()

Fit(MapItem)

Fit map item to view.

public void Fit(MapItem mapItem)

Parameters

mapItem MapItem

Map item.

Fit(double, double, double, double)

Fit to given rectangle.

public void Fit(double xMin, double yMin, double xMax, double yMax)

Parameters

xMin double
param xMin M:LightningChartLib.WinForms.Charting.Maps.Map.Fit(System.Double,System.Double,System.Double,System.Double)
yMin double
param yMin M:LightningChartLib.WinForms.Charting.Maps.Map.Fit(System.Double,System.Double,System.Double,System.Double)
xMax double
param xMax M:LightningChartLib.WinForms.Charting.Maps.Map.Fit(System.Double,System.Double,System.Double,System.Double)
yMax double
param yMax M:LightningChartLib.WinForms.Charting.Maps.Map.Fit(System.Double,System.Double,System.Double,System.Double)

GetVisibleMapItems()

Get visible map items per layer.

public MapItem[][] GetVisibleMapItems()

Returns

MapItem[][]

List of visible map items per layer.

ImportNewLayer(string, int)

Import new layer from shp data and insert it into map on given layer. Other layers are moved if necessary.

public MapConverter.ConversionResult ImportNewLayer(string shpFilename, int targetLayerIndex)

Parameters

shpFilename string

Shp file name.

targetLayerIndex int

Target layer index.

Returns

MapConverter.ConversionResult

Success status.

ImportNewLayer(string, int, string)

Import new layer from shp data and insert it into map on given layer. Other layers are moved if necessary.

public MapConverter.ConversionResult ImportNewLayer(string shpFilename, int targetLayerIndex, string configFile)

Parameters

shpFilename string

Shp file name.

targetLayerIndex int

Target layer index.

configFile string

Configuration file name.

Returns

MapConverter.ConversionResult

Success status.

ImportReplaceLayer(string, int)

Import new layer from shp data and replace data on given layer.

public MapConverter.ConversionResult ImportReplaceLayer(string shpFilename, int targetLayerIndex)

Parameters

shpFilename string

Shp file name.

targetLayerIndex int

Target layer index.

Returns

MapConverter.ConversionResult

Success status.

ImportReplaceLayer(string, int, string)

Import new layer from shp data and replace data on given layer.

public MapConverter.ConversionResult ImportReplaceLayer(string shpFilename, int targetLayerIndex, string configFile)

Parameters

shpFilename string

Shp file name.

targetLayerIndex int

Target layer index.

configFile string

Configuration file name.

Returns

MapConverter.ConversionResult

Success status.

OnDeserialized(StreamingContext)

OnDeserialized is called just after the object has been deserialized.

[OnDeserialized]
public void OnDeserialized(StreamingContext context)

Parameters

context StreamingContext

Context.

RefreshMapList()

Refresh map name list. Map names are available at Names property.

public void RefreshMapList()

ToString()

Convert class description to string.

public override string ToString()

Returns

string

String.

Events

ButtonDownOnMapItem

Occurs when a button is pressed down while the user interactive device is on the map item.

public event Map.ButtonDownOnMapItemEventHandler ButtonDownOnMapItem

Event Type

Map.ButtonDownOnMapItemEventHandler

LoadError

Occurs when a map loading error occurs.

public event Map.LoadErrorEventHandler LoadError

Event Type

Map.LoadErrorEventHandler

MapChanged

Occurs when the map changes.

public event Map.MapChangedEventHandler MapChanged

Event Type

Map.MapChangedEventHandler

OverOffMapItem

Occurs when the user interactive device is moved out over the map item.

public event Map.OverOffMapItemEventHandler OverOffMapItem

Event Type

Map.OverOffMapItemEventHandler

OverOnMapItem

Occurs when the user interactive device is moved in over the map item.

public event Map.OverOnMapItemEventHandler OverOnMapItem

Event Type

Map.OverOnMapItemEventHandler