Table of Contents

Class MapArguments

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

Contains important properties and methods of current map object.

public class MapArguments
Inheritance
MapArguments
Inherited Members

Constructors

MapArguments()

Constructor of MapArguments.

public MapArguments()

MapArguments(RectangleShape, GeographyUnit, float, float)

Initializes a new instance of the MapArguments class.

public MapArguments(RectangleShape currentExtent, GeographyUnit mapUnit, float screenWidth, float screenHeight)

Parameters

currentExtent RectangleShape

The current extent.

mapUnit GeographyUnit

The map unit.

screenWidth float

Width of the screen.

screenHeight float

Height of the screen.

Properties

CenterPoint

public PointShape CenterPoint { get; set; }

Property Value

PointShape

CurrentExtent

Gets or sets the extent of current map.

public RectangleShape CurrentExtent { get; set; }

Property Value

RectangleShape

CurrentResolution

Gets or sets a double value that indicates the current resolution of the map.

public double CurrentResolution { get; set; }

Property Value

double

A double value that indicates the current resolution of the map.

CurrentScale

Gets or sets the scale factor, this is a value number of device pixels per logical coordinate point.

public double CurrentScale { get; set; }

Property Value

double

The scale factory value.

Remarks

The coordinate space used by application developers is measured in logical points. High-resolution (Retina) displays will have more than a single physical pixel per logical point and this property specifies the scale factor.

CustomData

Gets the custom data.

public Dictionary<string, object> CustomData { get; }

Property Value

Dictionary<string, object>

The custom data.

MapHeight

public double MapHeight { get; set; }

Property Value

double

MapUnit

Gets or sets the GeographyUnit for the map.

public GeographyUnit MapUnit { get; set; }

Property Value

GeographyUnit

The GeographyUnit object that indicates which geography unit the map is currently using.

MapWidth

public double MapWidth { get; set; }

Property Value

double

MaxExtent

Gets or sets the max extent of current map.

public RectangleShape MaxExtent { get; set; }

Property Value

RectangleShape

MaximumScale

This property gets and sets a maximum scale when navigating the map.

When you keep zooming out, and the target scale is bigger than the maximum scale, the zooming operation will be stopped.

public double MaximumScale { get; set; }

Property Value

double

MinimumScale

This property gets and sets a minimum scale when navigating the map.

When you keep zooming in, and the target scale is smaller than the minimum scale, the zooming operation will be stopped.

public double MinimumScale { get; set; }

Property Value

double

PivotScreenPoint

public ScreenPointF PivotScreenPoint { get; set; }

Property Value

ScreenPointF

PivotWorldPoint

public PointShape PivotWorldPoint { get; set; }

Property Value

PointShape

RotationAngle

public double RotationAngle { get; set; }

Property Value

double

RotationEnabled

public bool RotationEnabled { get; set; }

Property Value

bool

ScaleFactor

public float ScaleFactor { get; set; }

Property Value

float

ScreenHeight

Gets or sets the height of current map object in screen coordinate.It would be the same as ScreenHeight if the map is in rotation

public double ScreenHeight { get; set; }

Property Value

double

ScreenWidth

Gets or sets the width of current map object in screen coordinate.It would be the same as ScreenHeight if the map is in rotation

public double ScreenWidth { get; set; }

Property Value

double

ZoomLevelScales

Gets a collection of double values that determines the zoomlevel scales.

public Collection<double> ZoomLevelScales { get; }

Property Value

Collection<double>

A collection of double values that determines the openlayers' zoomlevel scales.

ZoomLevelSet

This property gets or sets the ZoomLevelSet used for the MapView control.

public ZoomLevelSet ZoomLevelSet { get; set; }

Property Value

ZoomLevelSet

The zoom level set.

ZoomLevelSnappingMode

public ZoomLevelSnappingMode ZoomLevelSnappingMode { get; set; }

Property Value

ZoomLevelSnappingMode

Methods

GetSnappedExtent(RectangleShape, ZoomSnapDirection)

public RectangleShape GetSnappedExtent(RectangleShape extent, ZoomSnapDirection zoomSnapDirection)

Parameters

extent RectangleShape
zoomSnapDirection ZoomSnapDirection

Returns

RectangleShape

GetSnappedZoomLevelIndex(double)

Gets a snapped zoom level index from the provided scale.

public int GetSnappedZoomLevelIndex(double scale)

Parameters

scale double

A scale to be snapped.

Returns

int

An integar value that indicates the snapped zoom level index.

Remarks

The scale will automatically snapped a closest scale from the ZoomLevelScale list, and create an extent back with the map's screen width and height.

GetSnappedZoomLevelIndex(RectangleShape)

Gets a snapped zoom level index from the provided extent.

public int GetSnappedZoomLevelIndex(RectangleShape extent)

Parameters

extent RectangleShape

An extent to be snapped.

Returns

int

An integar value that indicates the snapped zoom level index.

Remarks

The extent will automatically snapped a closest scale from the ZoomLevelScale list, and create an extent back with the map's screen width and height.

ToWorldCoordinate(ScreenPointF)

Converts a point from screen coordinate to world coordinate.

public PointShape ToWorldCoordinate(ScreenPointF screenCoordinate)

Parameters

screenCoordinate ScreenPointF

A point in screen coordinate to be converted.

Returns

PointShape

A point in world coordinate.