Skip to content

MapViewBase

Namespace: ThinkGeo.Core

public abstract class MapViewBase : System.Windows.Controls.Control, System.Windows.Media.Composition.DUCE+IResource, System.Windows.Media.Animation.IAnimatable, System.Windows.IInputElement, System.Windows.IFrameworkInputElement, System.ComponentModel.ISupportInitialize, System.Windows.Markup.IHaveResources, System.Windows.Markup.IQueryAmbient, System.IDisposable

Inheritance Object → DispatcherObject → DependencyObject → Visual → UIElement → FrameworkElement → Control → MapViewBase
Implements IResource, IAnimatable, IInputElement, IFrameworkInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IDisposable

Properties

StretchMode

public MapViewStretchMode StretchMode { get; set; }

Property Value

MapViewStretchMode

DefaultOverlaysRenderSequenceType

public OverlaysRenderSequenceType DefaultOverlaysRenderSequenceType { get; set; }

Property Value

OverlaysRenderSequenceType

MapUnit

Gets or sets the map unit used by the MapControl.

public GeographyUnit MapUnit { get; set; }

Property Value

GeographyUnit

Exceptions

InvalidOperationException
This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

Remarks:

The MapUnit reflects the data unit.

CurrentExtent

Gets or sets the current extent of the MapControl.

public RectangleShape CurrentExtent { get; set; }

Property Value

RectangleShape

Remarks:

The current extent stands for the extent of current position, this is very important metrics to caculate the scale.

MapFocusMode

This property gets or sets the MapFocusMode for the MapControl when dealing with the issue of the map taking focus.

public MapFocusMode MapFocusMode { get; set; }

Property Value

MapFocusMode

ZoomLevelSnappingMode

This property gets or sets the ZoomLevelSnappingMode

public ZoomLevelSnappingMode ZoomLevelSnappingMode { get; set; }

Property Value

ZoomLevelSnappingMode

BackgroundOverlay

Gets or sets the background overlay.

public BackgroundOverlay BackgroundOverlay { get; set; }

Property Value

BackgroundOverlay

AdornmentOverlay

Gets or sets the adornment overlay in the MapControl.

public AdornmentOverlay AdornmentOverlay { get; set; }

Property Value

AdornmentOverlay

Exceptions

InvalidOperationException
This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

TrackOverlay

Gets or sets the track overlay in the MapControl.

public TrackInteractiveOverlay TrackOverlay { get; set; }

Property Value

TrackInteractiveOverlay

ExtentOverlay

Gets or sets the extent overlay in the MapControl.

public ExtentInteractiveOverlay ExtentOverlay { get; set; }

Property Value

ExtentInteractiveOverlay

EditOverlay

Gets or sets the edit overlay in the MapControl.

public EditInteractiveOverlay EditOverlay { get; set; }

Property Value

EditInteractiveOverlay

Overlays

This property gets the collection of Overlays in the MapControl.

public GeoCollection<Overlay> Overlays { get; }

Property Value

GeoCollection<Overlay>

Exceptions

InvalidOperationException
This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

InteractiveOverlays

This property gets the collection of InteractiveOverlays in the MapControl.

public GeoCollection<InteractiveOverlay> InteractiveOverlays { get; }

Property Value

GeoCollection<InteractiveOverlay>

Exceptions

InvalidOperationException
This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

Remarks:

This property is used when you want to change the default behavior of the InteractiveOverlay or add your own customized InteractiveOverlay.

MapTools

Gets a object for simply using MapTools.

public MapTools MapTools { get; protected set; }

Property Value

MapTools

CurrentScale

Gets or sets current viewport scale.

public double CurrentScale { get; }

Property Value

Double

ZoomLevelSet

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

public ZoomLevelSet ZoomLevelSet { get; set; }

Property Value

ZoomLevelSet

MapResizeMode

Gets a strategy for changing extent when resizes map control.

public MapResizeMode MapResizeMode { get; set; }

Property Value

MapResizeMode

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

RestrictExtent

This property gets or sets an extent to restrict the map navigation.

public RectangleShape RestrictExtent { get; set; }

Property Value

RectangleShape

RotatedAngle

public float RotatedAngle { get; set; }

Property Value

Single

PivotScreenPoint

public ScreenPointF PivotScreenPoint { get; }

Property Value

ScreenPointF

HistoryExtents

The collection of the history extents the maps has been set.

public Collection<RectangleShape> HistoryExtents { get; }

Property Value

Collection<RectangleShape>

HistoryExtentsCurrentIndex

The index of where the CurrentExtent exists in the HistoryExtents

public int HistoryExtentsCurrentIndex { get; }

Property Value

Int32

BorderBrush

public Brush BorderBrush { get; set; }

Property Value

Brush

BorderThickness

public Thickness BorderThickness { get; set; }

Property Value

Thickness

Background

public Brush Background { get; set; }

Property Value

Brush

Foreground

public Brush Foreground { get; set; }

Property Value

Brush

FontFamily

public FontFamily FontFamily { get; set; }

Property Value

FontFamily

FontSize

public double FontSize { get; set; }

Property Value

Double

FontStretch

public FontStretch FontStretch { get; set; }

Property Value

FontStretch

FontStyle

public FontStyle FontStyle { get; set; }

Property Value

FontStyle

FontWeight

public FontWeight FontWeight { get; set; }

Property Value

FontWeight

HorizontalContentAlignment

public HorizontalAlignment HorizontalContentAlignment { get; set; }

Property Value

HorizontalAlignment

VerticalContentAlignment

public VerticalAlignment VerticalContentAlignment { get; set; }

Property Value

VerticalAlignment

TabIndex

public int TabIndex { get; set; }

Property Value

Int32

IsTabStop

public bool IsTabStop { get; set; }

Property Value

Boolean

Padding

public Thickness Padding { get; set; }

Property Value

Thickness

Template

public ControlTemplate Template { get; set; }

Property Value

ControlTemplate

Style

public Style Style { get; set; }

Property Value

Style

OverridesDefaultStyle

public bool OverridesDefaultStyle { get; set; }

Property Value

Boolean

UseLayoutRounding

public bool UseLayoutRounding { get; set; }

Property Value

Boolean

Triggers

public TriggerCollection Triggers { get; }

Property Value

TriggerCollection

TemplatedParent

public DependencyObject TemplatedParent { get; }

Property Value

DependencyObject

Resources

public ResourceDictionary Resources { get; set; }

Property Value

ResourceDictionary

DataContext

public object DataContext { get; set; }

Property Value

Object

BindingGroup

public BindingGroup BindingGroup { get; set; }

Property Value

BindingGroup

Language

public XmlLanguage Language { get; set; }

Property Value

XmlLanguage

Name

public string Name { get; set; }

Property Value

String

Tag

public object Tag { get; set; }

Property Value

Object

InputScope

public InputScope InputScope { get; set; }

Property Value

InputScope

ActualWidth

public double ActualWidth { get; }

Property Value

Double

ActualHeight

public double ActualHeight { get; }

Property Value

Double

LayoutTransform

public Transform LayoutTransform { get; set; }

Property Value

Transform

Width

public double Width { get; set; }

Property Value

Double

MinWidth

public double MinWidth { get; set; }

Property Value

Double

MaxWidth

public double MaxWidth { get; set; }

Property Value

Double

Height

public double Height { get; set; }

Property Value

Double

MinHeight

public double MinHeight { get; set; }

Property Value

Double

MaxHeight

public double MaxHeight { get; set; }

Property Value

Double

FlowDirection

public FlowDirection FlowDirection { get; set; }

Property Value

FlowDirection

Margin

public Thickness Margin { get; set; }

Property Value

Thickness

HorizontalAlignment

public HorizontalAlignment HorizontalAlignment { get; set; }

Property Value

HorizontalAlignment

VerticalAlignment

public VerticalAlignment VerticalAlignment { get; set; }

Property Value

VerticalAlignment

FocusVisualStyle

public Style FocusVisualStyle { get; set; }

Property Value

Style

Cursor

public Cursor Cursor { get; set; }

Property Value

Cursor

ForceCursor

public bool ForceCursor { get; set; }

Property Value

Boolean

IsInitialized

public bool IsInitialized { get; }

Property Value

Boolean

IsLoaded

public bool IsLoaded { get; }

Property Value

Boolean

ToolTip

public object ToolTip { get; set; }

Property Value

Object

ContextMenu

public ContextMenu ContextMenu { get; set; }

Property Value

ContextMenu

Parent

public DependencyObject Parent { get; }

Property Value

DependencyObject

HasAnimatedProperties

public bool HasAnimatedProperties { get; }

Property Value

Boolean

InputBindings

public InputBindingCollection InputBindings { get; }

Property Value

InputBindingCollection

CommandBindings

public CommandBindingCollection CommandBindings { get; }

Property Value

CommandBindingCollection

AllowDrop

public bool AllowDrop { get; set; }

Property Value

Boolean

DesiredSize

public Size DesiredSize { get; }

Property Value

Size

IsMeasureValid

public bool IsMeasureValid { get; }

Property Value

Boolean

IsArrangeValid

public bool IsArrangeValid { get; }

Property Value

Boolean

RenderSize

public Size RenderSize { get; set; }

Property Value

Size

RenderTransform

public Transform RenderTransform { get; set; }

Property Value

Transform

RenderTransformOrigin

public Point RenderTransformOrigin { get; set; }

Property Value

Point

IsMouseDirectlyOver

public bool IsMouseDirectlyOver { get; }

Property Value

Boolean

IsMouseOver

public bool IsMouseOver { get; }

Property Value

Boolean

IsStylusOver

public bool IsStylusOver { get; }

Property Value

Boolean

IsKeyboardFocusWithin

public bool IsKeyboardFocusWithin { get; }

Property Value

Boolean

IsMouseCaptured

public bool IsMouseCaptured { get; }

Property Value

Boolean

IsMouseCaptureWithin

public bool IsMouseCaptureWithin { get; }

Property Value

Boolean

IsStylusDirectlyOver

public bool IsStylusDirectlyOver { get; }

Property Value

Boolean

IsStylusCaptured

public bool IsStylusCaptured { get; }

Property Value

Boolean

IsStylusCaptureWithin

public bool IsStylusCaptureWithin { get; }

Property Value

Boolean

IsKeyboardFocused

public bool IsKeyboardFocused { get; }

Property Value

Boolean

IsInputMethodEnabled

public bool IsInputMethodEnabled { get; }

Property Value

Boolean

Opacity

public double Opacity { get; set; }

Property Value

Double

OpacityMask

public Brush OpacityMask { get; set; }

Property Value

Brush

BitmapEffect

public BitmapEffect BitmapEffect { get; set; }

Property Value

BitmapEffect

Effect

public Effect Effect { get; set; }

Property Value

Effect

BitmapEffectInput

public BitmapEffectInput BitmapEffectInput { get; set; }

Property Value

BitmapEffectInput

CacheMode

public CacheMode CacheMode { get; set; }

Property Value

CacheMode

Uid

public string Uid { get; set; }

Property Value

String

Visibility

public Visibility Visibility { get; set; }

Property Value

Visibility

ClipToBounds

public bool ClipToBounds { get; set; }

Property Value

Boolean

Clip

public Geometry Clip { get; set; }

Property Value

Geometry

SnapsToDevicePixels

public bool SnapsToDevicePixels { get; set; }

Property Value

Boolean

IsFocused

public bool IsFocused { get; }

Property Value

Boolean

IsEnabled

public bool IsEnabled { get; set; }

Property Value

Boolean

IsHitTestVisible

public bool IsHitTestVisible { get; set; }

Property Value

Boolean

IsVisible

public bool IsVisible { get; }

Property Value

Boolean

Focusable

public bool Focusable { get; set; }

Property Value

Boolean

PersistId

public int PersistId { get; }

Property Value

Int32

IsManipulationEnabled

public bool IsManipulationEnabled { get; set; }

Property Value

Boolean

AreAnyTouchesOver

public bool AreAnyTouchesOver { get; }

Property Value

Boolean

AreAnyTouchesDirectlyOver

public bool AreAnyTouchesDirectlyOver { get; }

Property Value

Boolean

AreAnyTouchesCapturedWithin

public bool AreAnyTouchesCapturedWithin { get; }

Property Value

Boolean

AreAnyTouchesCaptured

public bool AreAnyTouchesCaptured { get; }

Property Value

Boolean

TouchesCaptured

public IEnumerable<TouchDevice> TouchesCaptured { get; }

Property Value

IEnumerable<TouchDevice>

TouchesCapturedWithin

public IEnumerable<TouchDevice> TouchesCapturedWithin { get; }

Property Value

IEnumerable<TouchDevice>

TouchesOver

public IEnumerable<TouchDevice> TouchesOver { get; }

Property Value

IEnumerable<TouchDevice>

TouchesDirectlyOver

public IEnumerable<TouchDevice> TouchesDirectlyOver { get; }

Property Value

IEnumerable<TouchDevice>

DependencyObjectType

public DependencyObjectType DependencyObjectType { get; }

Property Value

DependencyObjectType

IsSealed

public bool IsSealed { get; }

Property Value

Boolean

Dispatcher

public Dispatcher Dispatcher { get; }

Property Value

Dispatcher

Constructors

MapViewBase(Boolean)

Constructor of WPF MapControl.

public MapViewBase(bool designMode)

Parameters

designMode Boolean

Remarks:

Initilizes some class modular variables and hooks up events.

Methods

ToWorldCoordinate(PointShape)

Converts the provided screen points to world points.

public PointShape ToWorldCoordinate(PointShape screenCoordinate)

Parameters

screenCoordinate PointShape
Screen point to be converted.

Returns

PointShape
A world point that is converted from the provided parameters.

ToWorldCoordinate(Point)

Converts the provided screen points to world points.

public PointShape ToWorldCoordinate(Point screenCoordinate)

Parameters

screenCoordinate Point
Screen point to be converted.

Returns

PointShape
A world point that is converted from the provided parameters.

ToScreenCoordinate(Double, Double)

Converts the provided world points to screen points.

public PointShape ToScreenCoordinate(double worldX, double worldY)

Parameters

worldX Double
World x to be converted.

worldY Double
World y to be converted.

Returns

PointShape
A screen coordinate that is converted.

ToScreenCoordinate(PointShape)

Converts the provided world points to screen points.

public PointShape ToScreenCoordinate(PointShape worldCoordinate)

Parameters

worldCoordinate PointShape
World point to be converted.

Returns

PointShape
A screen coordinate that is converted.

ToScreenCoordinate(Point)

Converts the provided world points to screen points.

public PointShape ToScreenCoordinate(Point worldCoordinate)

Parameters

worldCoordinate Point
World point to be converted.

Returns

PointShape
A screen coordinate that is converted.

ZoomToPreviousExtentAsync(CancellationToken)

public Task ZoomToPreviousExtentAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

ZoomToPreviousExtentAsyncCore(CancellationToken)

protected Task ZoomToPreviousExtentAsyncCore(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

ZoomToNextExtentAsync(CancellationToken)

public Task ZoomToNextExtentAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

ZoomToNextExtentAsyncCore(CancellationToken)

protected Task ZoomToNextExtentAsyncCore(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

ZoomInAsync(CancellationToken)

Zooms the map in for one level

public Task ZoomInAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

ZoomInAsync(Int32, CancellationToken)

Zooms the map in by the provided percentage.

public Task ZoomInAsync(int percentage, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map in.

cancellationToken CancellationToken

Returns

Task

ZoomIntoCenterAsync(Int32, Feature, CancellationToken)

Zooms the map in by the provided percentage and locates the map to the center of the provided feature.

public Task ZoomIntoCenterAsync(int percentage, Feature centerFeature, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map in.

centerFeature Feature
A new center feature of current map.

cancellationToken CancellationToken

Returns

Task

ZoomIntoCenterAsync(Int32, PointShape, CancellationToken)

Zooms the map in by the provided percentage and locates to the center of the provided feature.

public Task ZoomIntoCenterAsync(int percentage, PointShape worldPoint, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map in.

worldPoint PointShape
A new center of current map.

cancellationToken CancellationToken

Returns

Task

ZoomIntoCenterAsync(Int32, ScreenPointF, CancellationToken)

Zooms the map in by the provided percentage and locates to the provided screen point.

public Task ZoomIntoCenterAsync(int percentage, ScreenPointF screenPoint, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map in.

screenPoint ScreenPointF
A new screen center to locate the map.

cancellationToken CancellationToken

Returns

Task

ZoomIntoCenterAsync(Int32, Single, Single, CancellationToken)

Zooms the map in by the provided percentage and locates to the provided screen x and y.

public Task ZoomIntoCenterAsync(int percentage, float screenX, float screenY, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map in.

screenX Single
Screen x to locate the map.

screenY Single
Screen y to locate the map.

cancellationToken CancellationToken

Returns

Task

ZoomToAsync(PointShape, Double, CancellationToken)

This method zooms current map to a specified position and scale.

public Task ZoomToAsync(PointShape targetWorldCenter, double targetScale, CancellationToken cancellationToken)

Parameters

targetWorldCenter PointShape
A world center to zoom the map to.

targetScale Double
A double value indicates the scale to zoom the map to.

cancellationToken CancellationToken

Returns

Task

Remarks:

When calling this method, it doesn't refresh existing Tiles on the current map. For example, if using a TileOverlay such as LayerOverlay; a layer style is changed, Refresh method is proper to call.

ZoomOutAsync(CancellationToken)

Zooms the map out for one level.

public Task ZoomOutAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

ZoomOutAsync(Int32, CancellationToken)

Zooms the map out by the provided percentage.

public Task ZoomOutAsync(int percentage, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map out.

cancellationToken CancellationToken

Returns

Task

ZoomOutToCenterAsync(Int32, Feature, CancellationToken)

Zooms the map out by the provided percentage and locates map to the center of the provided feature.

public Task ZoomOutToCenterAsync(int percentage, Feature centerFeature, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map out.

centerFeature Feature
A new center feature of current map.

cancellationToken CancellationToken

Returns

Task

ZoomOutToCenterAsync(Int32, PointShape, CancellationToken)

Zooms the map out by the provided percentage and locates to the center of the provided feature.

public Task ZoomOutToCenterAsync(int percentage, PointShape worldPoint, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map out.

worldPoint PointShape
A new center of current map.

cancellationToken CancellationToken

Returns

Task

ZoomOutToCenterAsync(Int32, ScreenPointF, CancellationToken)

Zooms the map out by the provided percentage and locates to the provided screen point.

public Task ZoomOutToCenterAsync(int percentage, ScreenPointF screenPoint, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map out.

screenPoint ScreenPointF
A new screen center to locate the map.

cancellationToken CancellationToken

Returns

Task

ZoomOutToCenterAsync(Int32, Single, Single, CancellationToken)

Zooms the map out by the provided percentage and locates to the provided screen x and y.

public Task ZoomOutToCenterAsync(int percentage, float screenX, float screenY, CancellationToken cancellationToken)

Parameters

percentage Int32
A scale to zoom the map out.

screenX Single
Screen x to locate the map.

screenY Single
Screen y to locate the map.

cancellationToken CancellationToken

Returns

Task

ZoomToScaleAsync(Double, CancellationToken)

Zooms the map to a provided scale.

public Task ZoomToScaleAsync(double targetScale, CancellationToken cancellationToken)

Parameters

targetScale Double
Target scale to zoom the map.

cancellationToken CancellationToken

Returns

Task

ZoomToScaleAsync(Double, ScreenPointF, CancellationToken)

Zooms the map to a provided scale and locates the map by the provided screen offset.

public Task ZoomToScaleAsync(double targetScale, ScreenPointF offsetScreenPoint, CancellationToken cancellationToken)

Parameters

targetScale Double
Target scale to zoom the map.

offsetScreenPoint ScreenPointF
An screen offset to locate the map.

cancellationToken CancellationToken

Returns

Task

ZoomToScaleAsync(Double, Single, Single, CancellationToken)

Zooms the map to a provided scale and locates the map by the provided screen offset.

public Task ZoomToScaleAsync(double targetScale, float offsetScreenX, float offsetScreenY, CancellationToken cancellationToken)

Parameters

targetScale Double
Target scale to zoom the map.

offsetScreenX Single
An screen offset x to locate the map.

offsetScreenY Single
An screen offset y to locate the map.

cancellationToken CancellationToken

Returns

Task

FindFeatureLayer(String)

Finds a FeatureLayer by the specified key.

public FeatureLayer FindFeatureLayer(string key)

Parameters

key String
A key of a FeatureLayer which is defined when adding the layer into the LayerOverlay.

Returns

FeatureLayer
A FeatureLayer which is paired with the specified key in the map overlays.

FindRasterLayer(String)

Finds a RasterLayer by the specified key.

public RasterLayer FindRasterLayer(string key)

Parameters

key String
A key of a RasterLayer which is defined when adding the layer into the LayerOverlay.

Returns

RasterLayer
A RasterLayer which is paired with the specified key in the map overlays.

PanByDegreesAsync(Double, Int32, CancellationToken)

This function will pan the currentExtent based on an angle and percentage.

public Task PanByDegreesAsync(double degree, int percentage, CancellationToken cancellationToken)

Parameters

degree Double
This parameter is the degree (angle) in which you want to pan.

percentage Int32
This parameter is the percentage by which you want to pan.

cancellationToken CancellationToken

Returns

Task
None.

Exceptions

InvalidOperationException

        This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

Remarks:

This method will change the current extent by panning according to the angle and percentage specified.

PanByDirectionAsync(PanDirection, Int32, CancellationToken)

This function will pan the currentExtent based on a direction and percentage.

public Task PanByDirectionAsync(PanDirection panDirection, int percentage, CancellationToken cancellationToken)

Parameters

panDirection PanDirection
This parameter is the direction in which you want to pan.

percentage Int32
This parameter is the percentage by which you want to pan.

cancellationToken CancellationToken

Returns

Task
None.

Exceptions

InvalidOperationException
This InvalidOperationException exception will be thrown when you get or set the property in another thread instead of the thread that created the WpfMap.

Remarks:

This method will change the current extent by panning according to the direction and percentage specified.

PanByOffsetAsync(Double, Double, CancellationToken)

Pans the map by the provided screen offset.

public Task PanByOffsetAsync(double offsetScreenX, double offsetScreenY, CancellationToken cancellationToken)

Parameters

offsetScreenX Double
Screen offset X to be paned.

offsetScreenY Double
Screen offset Y to be paned.

cancellationToken CancellationToken

Returns

Task

CenterAtAsync(PointShape, CancellationToken)

Locates the map center to the specified world point.

public Task CenterAtAsync(PointShape worldPoint, CancellationToken cancellationToken)

Parameters

worldPoint PointShape
A world point to locate the map.

cancellationToken CancellationToken

Returns

Task

CenterAtAsync(ScreenPointF, CancellationToken)

Locates the map center to the specified screen point.

public Task CenterAtAsync(ScreenPointF screenPoint, CancellationToken cancellationToken)

Parameters

screenPoint ScreenPointF
A screen point to locate the map.

cancellationToken CancellationToken

Returns

Task

CenterAtAsync(Feature, CancellationToken)

Locates the map center to the center of the specified feature.

public Task CenterAtAsync(Feature centerFeature, CancellationToken cancellationToken)

Parameters

centerFeature Feature
A feature to locates the map center.

cancellationToken CancellationToken

Returns

Task

CenterAtAsync(Single, Single, CancellationToken)

Locates the map center to the center of the specified feature.

public Task CenterAtAsync(float screenX, float screenY, CancellationToken cancellationToken)

Parameters

screenX Single
Screen x to locate the map center.

screenY Single
Screen y to locate the map center.

cancellationToken CancellationToken

Returns

Task

GetZoomLevelScale(Int32)

internal double GetZoomLevelScale(int index)

Parameters

index Int32

Returns

Double

<zoomTransform_Changed>g__SetPositionAction|13_0(Point, FrameworkElement, <>c__DisplayClass13_0&)

internal static void <zoomTransform_Changed>g__SetPositionAction|13_0(Point worldPosition, FrameworkElement icon, <>c__DisplayClass13_0& )

Parameters

worldPosition Point

icon FrameworkElement

`` <>c__DisplayClass13_0&

OnApplyTemplate()

Applys current map template.

public void OnApplyTemplate()

GetSnapshot()

Get current map snapshot

public GeoImage GetSnapshot()

Returns

GeoImage

GetSnapshot(Int32, Int32)

Get current map snapshot and scale to the specified width and height

public GeoImage GetSnapshot(int width, int height)

Parameters

width Int32

height Int32

Returns

GeoImage

RefreshAsync(OverlayRefreshType, CancellationToken)

Refreshes current map control.

public Task RefreshAsync(OverlayRefreshType refreshType, CancellationToken cancellationToken)

Parameters

refreshType OverlayRefreshType
Indicates where the existing tiles will be refreshed.

cancellationToken CancellationToken

Returns

Task

Remarks:

Refreshes all the existing overlays and map tools.

RefreshAsync(RectangleShape, OverlayRefreshType, CancellationToken)

public Task RefreshAsync(RectangleShape extent, OverlayRefreshType refreshType, CancellationToken cancellationToken)

Parameters

extent RectangleShape

refreshType OverlayRefreshType

cancellationToken CancellationToken

Returns

Task

RefreshAsync(Overlay, OverlayRefreshType, CancellationToken)

public Task RefreshAsync(Overlay overlay, OverlayRefreshType refreshType, CancellationToken cancellationToken)

Parameters

overlay Overlay

refreshType OverlayRefreshType

cancellationToken CancellationToken

Returns

Task

RefreshAsync(IEnumerable<Overlay>, OverlayRefreshType, CancellationToken)

Refreshes a specified overlay collection.

public Task RefreshAsync(IEnumerable<Overlay> overlays, OverlayRefreshType refreshType, CancellationToken cancellationToken)

Parameters

overlays IEnumerable<Overlay>
A collection of overlay to be refreshed.

refreshType OverlayRefreshType

cancellationToken CancellationToken

Returns

Task

RefreshAsync(RectangleShape, Overlay, OverlayRefreshType, CancellationToken)

public Task RefreshAsync(RectangleShape extent, Overlay overlay, OverlayRefreshType refreshType, CancellationToken cancellationToken)

Parameters

extent RectangleShape

overlay Overlay

refreshType OverlayRefreshType

cancellationToken CancellationToken

Returns

Task

RefreshAsync(RectangleShape, IEnumerable<Overlay>, OverlayRefreshType, CancellationToken)

public Task RefreshAsync(RectangleShape extent, IEnumerable<Overlay> overlays, OverlayRefreshType refreshType, CancellationToken cancellationToken)

Parameters

extent RectangleShape

overlays IEnumerable<Overlay>

refreshType OverlayRefreshType

cancellationToken CancellationToken

Returns

Task

GetVersion()

This static method will be useful when you want to report a bug in a specified version of Map Suite. You can use it to tell ThinkGeo support which version you are trying to use.

public static string GetVersion()

Returns

String

        A string representing the version of the MapSuiteCore and Map Suite Desktop product that you are now
        using.

SaveState()

This method saves map state to a byte array.

public Byte[] SaveState()

Returns

Byte[]
A byte array indicates current map state.

SaveStateCore()

This method saves map state to a byte array.

protected Byte[] SaveStateCore()

Returns

Byte[]
A byte array indicates current map state.

LoadState(Byte[])

This method restore map state back from the specified state.

public void LoadState(Byte[] state)

Parameters

state Byte[]
This parameter indicates the state for restore the map.

LoadStateCore(Byte[])

This method restore map state back from the specified state.

protected void LoadStateCore(Byte[] state)

Parameters

state Byte[]
This parameter indicates the state for restore the map.

Dispose()

Disposes unmanaged objects in map.

public void Dispose()

Finalize()

Finalize method of WpfMap class.

protected void Finalize()

Dispose(Boolean)

Disposes unmanaged objects in map.

protected void Dispose(bool disposing)

Parameters

disposing Boolean

DrawAsync(RectangleShape, OverlayRefreshType, CancellationToken)

Draws the map by the provided extent.

protected Task DrawAsync(RectangleShape targetExtent, OverlayRefreshType refreshType, CancellationToken cancellationToken)

Parameters

targetExtent RectangleShape
An extent that to draw current map.

refreshType OverlayRefreshType
Indicates whether the map needs to be refreshed. For example, a style of layer is changed, the overlay needs to be refreshed. When panning, the overlay only changes its position, refresh is not needed.

cancellationToken CancellationToken

Returns

Task

DrawAsyncCore(RectangleShape, OverlayRefreshType, CancellationToken)

Draws the map by the provided extent.

protected Task DrawAsyncCore(RectangleShape targetExtent, OverlayRefreshType overlayRefreshType, CancellationToken cancellationToken)

Parameters

targetExtent RectangleShape
An extent that to draw current map.

overlayRefreshType OverlayRefreshType
Indicates whether the map needs to be refreshed. For example, a style of layer is changed, the overlay needs to be refreshed. When panning, the overlay only changes its position, refresh is not needed.

cancellationToken CancellationToken

Returns

Task

ToggleMapExtentsAsync(CancellationToken)

Toggles the map between current extent and previous extent.

public Task ToggleMapExtentsAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Returns

Task

GetSnappedExtent(RectangleShape)

Gets a snapped extent from a specified extent.

public RectangleShape GetSnappedExtent(RectangleShape extent)

Parameters

extent RectangleShape
An extent to be snapped.

Returns

RectangleShape
An extent that is snapped from the provided extent.

Remarks:

The specified extent may not be the exact extent to be displayed in the pre-defined zoom level list. To display properly, the source extent needs to be snapped first.

GetSnappedZoomLevelIndex(RectangleShape)

Gets the snapped zoom level index from the provided world extent.

public int GetSnappedZoomLevelIndex(RectangleShape targetExtent)

Parameters

targetExtent RectangleShape
A world extent to be snapped.

Returns

Int32
A snapped zoom level index in the zoom levels sychnonized by the SyncZoomLevelScales method.

GetSnappedZoomLevelIndex(Double)

Gets the snapped zoom level index from the provided scale.

public int GetSnappedZoomLevelIndex(double scale)

Parameters

scale Double
A scale to be snapped.

Returns

Int32
A snapped zoom level index in scale list sychnonized by the SyncZoomLevelScales method.

ToWorldCoordinate(Double, Double)

Converts the provided screen points to world points.

public PointShape ToWorldCoordinate(double screenX, double screenY)

Parameters

screenX Double
Screen x to be converted.

screenY Double
Screen y to be converted.

Returns

PointShape
A world point that is converted from the provided parameters.

InitStretchCanvas(Canvas)

public void InitStretchCanvas(Canvas canvas)

Parameters

canvas Canvas

OnMapClick(MapClickMapViewEventArgs)

Occurs when clicking on the map.

protected void OnMapClick(MapClickMapViewEventArgs e)

Parameters

e MapClickMapViewEventArgs
Event argument for MapClick event.

OnMapTap(MapTapMapViewEventArgs)

Occurs when tapping on the map.

protected void OnMapTap(MapTapMapViewEventArgs e)

Parameters

e MapTapMapViewEventArgs
Event argument for MapTap event.

OnMapDoubleClick(MapClickMapViewEventArgs)

Occurs when double clicking on the map.

protected void OnMapDoubleClick(MapClickMapViewEventArgs e)

Parameters

e MapClickMapViewEventArgs
Event argument for MapDoubleClick event.

OnCurrentExtentChanging(CurrentExtentChangingMapViewEventArgs)

Occurs when map's current extent is changing.

protected void OnCurrentExtentChanging(CurrentExtentChangingMapViewEventArgs e)

Parameters

e CurrentExtentChangingMapViewEventArgs
Event argument for CurrentExtentChanging event.

OnZoomLevelSetChanged(ZoomLevelSetChangedMapViewEventArgs)

Occurs when map's zoom level set is changed.

protected void OnZoomLevelSetChanged(ZoomLevelSetChangedMapViewEventArgs e)

Parameters

e ZoomLevelSetChangedMapViewEventArgs
Event argument for ZoomLevelSetChanged event.

OnCurrentExtentChanged(CurrentExtentChangedMapViewEventArgs)

Occurs when map's current extent is changed.

protected void OnCurrentExtentChanged(CurrentExtentChangedMapViewEventArgs e)

Parameters

e CurrentExtentChangedMapViewEventArgs
Event argument for CurrentExtentChanged event.

OnCurrentScaleChanging(CurrentScaleChangingMapViewEventArgs)

Occurs when map's current scale is changing.

protected void OnCurrentScaleChanging(CurrentScaleChangingMapViewEventArgs e)

Parameters

e CurrentScaleChangingMapViewEventArgs
Event argument for CurrentScaleChanging event.

OnCurrentScaleChanged(CurrentScaleChangedMapViewEventArgs)

Occurs when map's current scale is changed.

protected void OnCurrentScaleChanged(CurrentScaleChangedMapViewEventArgs e)

Parameters

e CurrentScaleChangedMapViewEventArgs
Event argument for CurrentScaleChanged event.

OnOverlayDrawing(OverlayDrawingMapViewEventArgs)

Occurs when an overlay is drawing.

protected void OnOverlayDrawing(OverlayDrawingMapViewEventArgs e)

Parameters

e OverlayDrawingMapViewEventArgs
Event argument for OverlayDrawing event.

OnOverlayDrawn(OverlayDrawnMapViewEventArgs)

Occurs when an overlay is drawn.

protected void OnOverlayDrawn(OverlayDrawnMapViewEventArgs e)

Parameters

e OverlayDrawnMapViewEventArgs
Event argument for OverlayDrawn event.

OnOverlaysDrawing(OverlaysDrawingMapViewEventArgs)

Occurs when all overlays are drawing.

protected void OnOverlaysDrawing(OverlaysDrawingMapViewEventArgs e)

Parameters

e OverlaysDrawingMapViewEventArgs
Event argument for OverlaysDrawing event.

OnOverlaysDrawn(OverlaysDrawnMapViewEventArgs)

Occurs when overlays are drawn.

protected void OnOverlaysDrawn(OverlaysDrawnMapViewEventArgs e)

Parameters

e OverlaysDrawnMapViewEventArgs
Event argument for OverlaysDrawn event.

OnStretchedTileClearing(StretchedTileClearingMapViewEventArgs)

Occurs before clearing stretched tile.

protected void OnStretchedTileClearing(StretchedTileClearingMapViewEventArgs e)

Parameters

e StretchedTileClearingMapViewEventArgs
Event argument for StretchedTileClearing event.

OnStretchedTileCleared(StretchedTileClearedMapViewEventArgs)

Occurs after cleared stretched tile.

protected void OnStretchedTileCleared(StretchedTileClearedMapViewEventArgs e)

Parameters

e StretchedTileClearedMapViewEventArgs
Event argument for StretchedTileCleared event.

OnCollectedMapArguments(CollectedMapArgumentsMapViewEventArgs)

Occurs after collecting the map arguments.

protected void OnCollectedMapArguments(CollectedMapArgumentsMapViewEventArgs e)

Parameters

e CollectedMapArgumentsMapViewEventArgs
Event argument for StretchedTileCleared event.

Events

MapClick

Occurs when clicking on the map.

public event EventHandler<MapClickMapViewEventArgs> MapClick;

MapTap

Occurs when tapping on the map.

public event EventHandler<MapTapMapViewEventArgs> MapTap;

MapDoubleClick

Occurs when double click on the map.

public event EventHandler<MapClickMapViewEventArgs> MapDoubleClick;

CurrentExtentChanging

Occurs before map's extent is changing.

public event EventHandler<CurrentExtentChangingMapViewEventArgs> CurrentExtentChanging;

ZoomLevelSetChanged

Occurs after map's zoom level set is changed.

public event EventHandler<ZoomLevelSetChangedMapViewEventArgs> ZoomLevelSetChanged;

CurrentExtentChanged

Occurs after map's extent is changed.

public event EventHandler<CurrentExtentChangedMapViewEventArgs> CurrentExtentChanged;

CurrentScaleChanging

Occurs before map's current scale is changing.

public event EventHandler<CurrentScaleChangingMapViewEventArgs> CurrentScaleChanging;

CurrentScaleChanged

Occurs after map's current scale is changed.

public event EventHandler<CurrentScaleChangedMapViewEventArgs> CurrentScaleChanged;

OverlayDrawing

Occurs before an overlay is drawing.

public event EventHandler<OverlayDrawingMapViewEventArgs> OverlayDrawing;

OverlayDrawn

Occurs after an overlay is drawn.

public event EventHandler<OverlayDrawnMapViewEventArgs> OverlayDrawn;

OverlaysDrawing

Occurs before all overlays are drawing.

public event EventHandler<OverlaysDrawingMapViewEventArgs> OverlaysDrawing;

OverlaysDrawn

Occurs after all overlays are drawn.

public event EventHandler<OverlaysDrawnMapViewEventArgs> OverlaysDrawn;

StretchedTileClearing

Occurs before cleaning stretched tile.

public event EventHandler<StretchedTileClearingMapViewEventArgs> StretchedTileClearing;

StretchedTileCleared

Occurs after cleared stretched tile.

public event EventHandler<StretchedTileClearedMapViewEventArgs> StretchedTileCleared;

CollectedMapArguments

Occurs after collected MapArguments.

public event EventHandler<CollectedMapArgumentsMapViewEventArgs> CollectedMapArguments;

PreviewMouseDoubleClick

public event MouseButtonEventHandler PreviewMouseDoubleClick;

MouseDoubleClick

public event MouseButtonEventHandler MouseDoubleClick;

TargetUpdated

public event EventHandler<DataTransferEventArgs> TargetUpdated;

SourceUpdated

public event EventHandler<DataTransferEventArgs> SourceUpdated;

DataContextChanged

public event DependencyPropertyChangedEventHandler DataContextChanged;

RequestBringIntoView

public event RequestBringIntoViewEventHandler RequestBringIntoView;

SizeChanged

public event SizeChangedEventHandler SizeChanged;

Initialized

public event EventHandler Initialized;

Loaded

public event RoutedEventHandler Loaded;

Unloaded

public event RoutedEventHandler Unloaded;

ToolTipOpening

public event ToolTipEventHandler ToolTipOpening;

ToolTipClosing

public event ToolTipEventHandler ToolTipClosing;

ContextMenuOpening

public event ContextMenuEventHandler ContextMenuOpening;

ContextMenuClosing

public event ContextMenuEventHandler ContextMenuClosing;

PreviewMouseDown

public event MouseButtonEventHandler PreviewMouseDown;

MouseDown

public event MouseButtonEventHandler MouseDown;

PreviewMouseUp

public event MouseButtonEventHandler PreviewMouseUp;

MouseUp

public event MouseButtonEventHandler MouseUp;

PreviewMouseLeftButtonDown

public event MouseButtonEventHandler PreviewMouseLeftButtonDown;

MouseLeftButtonDown

public event MouseButtonEventHandler MouseLeftButtonDown;

PreviewMouseLeftButtonUp

public event MouseButtonEventHandler PreviewMouseLeftButtonUp;

MouseLeftButtonUp

public event MouseButtonEventHandler MouseLeftButtonUp;

PreviewMouseRightButtonDown

public event MouseButtonEventHandler PreviewMouseRightButtonDown;

MouseRightButtonDown

public event MouseButtonEventHandler MouseRightButtonDown;

PreviewMouseRightButtonUp

public event MouseButtonEventHandler PreviewMouseRightButtonUp;

MouseRightButtonUp

public event MouseButtonEventHandler MouseRightButtonUp;

PreviewMouseMove

public event MouseEventHandler PreviewMouseMove;

MouseMove

public event MouseEventHandler MouseMove;

PreviewMouseWheel

public event MouseWheelEventHandler PreviewMouseWheel;

MouseWheel

public event MouseWheelEventHandler MouseWheel;

MouseEnter

public event MouseEventHandler MouseEnter;

MouseLeave

public event MouseEventHandler MouseLeave;

GotMouseCapture

public event MouseEventHandler GotMouseCapture;

LostMouseCapture

public event MouseEventHandler LostMouseCapture;

QueryCursor

public event QueryCursorEventHandler QueryCursor;

PreviewStylusDown

public event StylusDownEventHandler PreviewStylusDown;

StylusDown

public event StylusDownEventHandler StylusDown;

PreviewStylusUp

public event StylusEventHandler PreviewStylusUp;

StylusUp

public event StylusEventHandler StylusUp;

PreviewStylusMove

public event StylusEventHandler PreviewStylusMove;

StylusMove

public event StylusEventHandler StylusMove;

PreviewStylusInAirMove

public event StylusEventHandler PreviewStylusInAirMove;

StylusInAirMove

public event StylusEventHandler StylusInAirMove;

StylusEnter

public event StylusEventHandler StylusEnter;

StylusLeave

public event StylusEventHandler StylusLeave;

PreviewStylusInRange

public event StylusEventHandler PreviewStylusInRange;

StylusInRange

public event StylusEventHandler StylusInRange;

PreviewStylusOutOfRange

public event StylusEventHandler PreviewStylusOutOfRange;

StylusOutOfRange

public event StylusEventHandler StylusOutOfRange;

PreviewStylusSystemGesture

public event StylusSystemGestureEventHandler PreviewStylusSystemGesture;

StylusSystemGesture

public event StylusSystemGestureEventHandler StylusSystemGesture;

GotStylusCapture

public event StylusEventHandler GotStylusCapture;

LostStylusCapture

public event StylusEventHandler LostStylusCapture;

StylusButtonDown

public event StylusButtonEventHandler StylusButtonDown;

StylusButtonUp

public event StylusButtonEventHandler StylusButtonUp;

PreviewStylusButtonDown

public event StylusButtonEventHandler PreviewStylusButtonDown;

PreviewStylusButtonUp

public event StylusButtonEventHandler PreviewStylusButtonUp;

PreviewKeyDown

public event KeyEventHandler PreviewKeyDown;

KeyDown

public event KeyEventHandler KeyDown;

PreviewKeyUp

public event KeyEventHandler PreviewKeyUp;

KeyUp

public event KeyEventHandler KeyUp;

PreviewGotKeyboardFocus

public event KeyboardFocusChangedEventHandler PreviewGotKeyboardFocus;

GotKeyboardFocus

public event KeyboardFocusChangedEventHandler GotKeyboardFocus;

PreviewLostKeyboardFocus

public event KeyboardFocusChangedEventHandler PreviewLostKeyboardFocus;

LostKeyboardFocus

public event KeyboardFocusChangedEventHandler LostKeyboardFocus;

PreviewTextInput

public event TextCompositionEventHandler PreviewTextInput;

TextInput

public event TextCompositionEventHandler TextInput;

PreviewQueryContinueDrag

public event QueryContinueDragEventHandler PreviewQueryContinueDrag;

QueryContinueDrag

public event QueryContinueDragEventHandler QueryContinueDrag;

PreviewGiveFeedback

public event GiveFeedbackEventHandler PreviewGiveFeedback;

GiveFeedback

public event GiveFeedbackEventHandler GiveFeedback;

PreviewDragEnter

public event DragEventHandler PreviewDragEnter;

DragEnter

public event DragEventHandler DragEnter;

PreviewDragOver

public event DragEventHandler PreviewDragOver;

DragOver

public event DragEventHandler DragOver;

PreviewDragLeave

public event DragEventHandler PreviewDragLeave;

DragLeave

public event DragEventHandler DragLeave;

PreviewDrop

public event DragEventHandler PreviewDrop;

Drop

public event DragEventHandler Drop;

PreviewTouchDown

public event EventHandler<TouchEventArgs> PreviewTouchDown;

TouchDown

public event EventHandler<TouchEventArgs> TouchDown;

PreviewTouchMove

public event EventHandler<TouchEventArgs> PreviewTouchMove;

TouchMove

public event EventHandler<TouchEventArgs> TouchMove;

PreviewTouchUp

public event EventHandler<TouchEventArgs> PreviewTouchUp;

TouchUp

public event EventHandler<TouchEventArgs> TouchUp;

GotTouchCapture

public event EventHandler<TouchEventArgs> GotTouchCapture;

LostTouchCapture

public event EventHandler<TouchEventArgs> LostTouchCapture;

TouchEnter

public event EventHandler<TouchEventArgs> TouchEnter;

TouchLeave

public event EventHandler<TouchEventArgs> TouchLeave;

IsMouseDirectlyOverChanged

public event DependencyPropertyChangedEventHandler IsMouseDirectlyOverChanged;

IsKeyboardFocusWithinChanged

public event DependencyPropertyChangedEventHandler IsKeyboardFocusWithinChanged;

IsMouseCapturedChanged

public event DependencyPropertyChangedEventHandler IsMouseCapturedChanged;

IsMouseCaptureWithinChanged

public event DependencyPropertyChangedEventHandler IsMouseCaptureWithinChanged;

IsStylusDirectlyOverChanged

public event DependencyPropertyChangedEventHandler IsStylusDirectlyOverChanged;

IsStylusCapturedChanged

public event DependencyPropertyChangedEventHandler IsStylusCapturedChanged;

IsStylusCaptureWithinChanged

public event DependencyPropertyChangedEventHandler IsStylusCaptureWithinChanged;

IsKeyboardFocusedChanged

public event DependencyPropertyChangedEventHandler IsKeyboardFocusedChanged;

LayoutUpdated

public event EventHandler LayoutUpdated;

GotFocus

public event RoutedEventHandler GotFocus;

LostFocus

public event RoutedEventHandler LostFocus;

IsEnabledChanged

public event DependencyPropertyChangedEventHandler IsEnabledChanged;

IsHitTestVisibleChanged

public event DependencyPropertyChangedEventHandler IsHitTestVisibleChanged;

IsVisibleChanged

public event DependencyPropertyChangedEventHandler IsVisibleChanged;

FocusableChanged

public event DependencyPropertyChangedEventHandler FocusableChanged;

ManipulationStarting

public event EventHandler<ManipulationStartingEventArgs> ManipulationStarting;

ManipulationStarted

public event EventHandler<ManipulationStartedEventArgs> ManipulationStarted;

ManipulationDelta

public event EventHandler<ManipulationDeltaEventArgs> ManipulationDelta;

ManipulationInertiaStarting

public event EventHandler<ManipulationInertiaStartingEventArgs> ManipulationInertiaStarting;

ManipulationBoundaryFeedback

public event EventHandler<ManipulationBoundaryFeedbackEventArgs> ManipulationBoundaryFeedback;

ManipulationCompleted

public event EventHandler<ManipulationCompletedEventArgs> ManipulationCompleted;