Skip to content

MapView

Namespace: ThinkGeo.UI.WinForms

public class MapView : System.Windows.Forms.Integration.ElementHost, System.ComponentModel.IComponent, System.IDisposable, System.Windows.Forms.UnsafeNativeMethods+IOleControl, System.Windows.Forms.UnsafeNativeMethods+IOleObject, System.Windows.Forms.UnsafeNativeMethods+IOleInPlaceObject, System.Windows.Forms.UnsafeNativeMethods+IOleInPlaceActiveObject, System.Windows.Forms.UnsafeNativeMethods+IOleWindow, System.Windows.Forms.UnsafeNativeMethods+IViewObject, System.Windows.Forms.UnsafeNativeMethods+IViewObject2, System.Windows.Forms.UnsafeNativeMethods+IPersist, System.Windows.Forms.UnsafeNativeMethods+IPersistStreamInit, System.Windows.Forms.UnsafeNativeMethods+IPersistPropertyBag, System.Windows.Forms.UnsafeNativeMethods+IPersistStorage, System.Windows.Forms.UnsafeNativeMethods+IQuickActivate, System.Windows.Forms.ISupportOleDropSource, System.Windows.Forms.IDropTarget, System.ComponentModel.ISynchronizeInvoke, System.Windows.Forms.IWin32Window, System.Windows.Forms.Layout.IArrangedElement, System.Windows.Forms.IBindableComponent, System.Windows.Forms.IKeyboardToolTip

Inheritance Object → MarshalByRefObject → Component → Control → ElementHost → MapView
Implements IComponent, IDisposable, IOleControl, IOleObject, IOleInPlaceObject, IOleInPlaceActiveObject, IOleWindow, IViewObject, IViewObject2, IPersist, IPersistStreamInit, IPersistPropertyBag, IPersistStorage, IQuickActivate, ISupportOleDropSource, IDropTarget, ISynchronizeInvoke, IWin32Window, IArrangedElement, IBindableComponent, IKeyboardToolTip

Properties

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.

BackgroundOverlay

Gets or sets the background overlay.

public BackgroundOverlay BackgroundOverlay { get; set; }

Property Value

BackgroundOverlay

MapFocusMode

Gets or sets the map focus mode.

public MapFocusMode MapFocusMode { get; set; }

Property Value

MapFocusMode

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; }

Property Value

MapTools

CurrentScale

Gets or sets current viewport scale.

public double CurrentScale { get; set; }

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

ActualWidth

public double ActualWidth { get; }

Property Value

Double

ActualHeight

public double ActualHeight { get; }

Property Value

Double

ZoomLevelSnappingMode

This property gets or sets ZoomLevelSnappingMode

public ZoomLevelSnappingMode ZoomLevelSnappingMode { get; set; }

Property Value

ZoomLevelSnappingMode

AutoSize

public bool AutoSize { get; set; }

Property Value

Boolean

HostContainer

public Panel HostContainer { get; }

Property Value

Panel

Child

public UIElement Child { get; set; }

Property Value

UIElement

Focused

public bool Focused { get; }

Property Value

Boolean

BackColorTransparent

public bool BackColorTransparent { get; set; }

Property Value

Boolean

PropertyMap

public PropertyMap PropertyMap { get; }

Property Value

PropertyMap

AccessibilityObject

public AccessibleObject AccessibilityObject { get; }

Property Value

AccessibleObject

AccessibleDefaultActionDescription

public string AccessibleDefaultActionDescription { get; set; }

Property Value

String

AccessibleDescription

public string AccessibleDescription { get; set; }

Property Value

String

AccessibleName

public string AccessibleName { get; set; }

Property Value

String

AccessibleRole

public AccessibleRole AccessibleRole { get; set; }

Property Value

AccessibleRole

AllowDrop

public bool AllowDrop { get; set; }

Property Value

Boolean

Anchor

public AnchorStyles Anchor { get; set; }

Property Value

AnchorStyles

AutoScrollOffset

public Point AutoScrollOffset { get; set; }

Property Value

Point

LayoutEngine

public LayoutEngine LayoutEngine { get; }

Property Value

LayoutEngine

BackColor

public Color BackColor { get; set; }

Property Value

Color

BackgroundImage

public Image BackgroundImage { get; set; }

Property Value

Image

BackgroundImageLayout

public ImageLayout BackgroundImageLayout { get; set; }

Property Value

ImageLayout

BindingContext

public BindingContext BindingContext { get; set; }

Property Value

BindingContext

Bottom

public int Bottom { get; }

Property Value

Int32

Bounds

public Rectangle Bounds { get; set; }

Property Value

Rectangle

CanFocus

public bool CanFocus { get; }

Property Value

Boolean

CanSelect

public bool CanSelect { get; }

Property Value

Boolean

Capture

public bool Capture { get; set; }

Property Value

Boolean

CausesValidation

public bool CausesValidation { get; set; }

Property Value

Boolean

ClientRectangle

public Rectangle ClientRectangle { get; }

Property Value

Rectangle

ClientSize

public Size ClientSize { get; set; }

Property Value

Size

CompanyName

public string CompanyName { get; }

Property Value

String

ContainsFocus

public bool ContainsFocus { get; }

Property Value

Boolean

ContextMenu

public ContextMenu ContextMenu { get; set; }

Property Value

ContextMenu

ContextMenuStrip

public ContextMenuStrip ContextMenuStrip { get; set; }

Property Value

ContextMenuStrip

Controls

public ControlCollection Controls { get; }

Property Value

ControlCollection

Created

public bool Created { get; }

Property Value

Boolean

Cursor

public Cursor Cursor { get; set; }

Property Value

Cursor

DataBindings

public ControlBindingsCollection DataBindings { get; }

Property Value

ControlBindingsCollection

DeviceDpi

public int DeviceDpi { get; }

Property Value

Int32

DisplayRectangle

public Rectangle DisplayRectangle { get; }

Property Value

Rectangle

IsDisposed

public bool IsDisposed { get; }

Property Value

Boolean

Disposing

public bool Disposing { get; }

Property Value

Boolean

Dock

public DockStyle Dock { get; set; }

Property Value

DockStyle

Enabled

public bool Enabled { get; set; }

Property Value

Boolean

Font

public Font Font { get; set; }

Property Value

Font

ForeColor

public Color ForeColor { get; set; }

Property Value

Color

Handle

public IntPtr Handle { get; }

Property Value

IntPtr

HasChildren

public bool HasChildren { get; }

Property Value

Boolean

Height

public int Height { get; set; }

Property Value

Int32

IsHandleCreated

public bool IsHandleCreated { get; }

Property Value

Boolean

InvokeRequired

public bool InvokeRequired { get; }

Property Value

Boolean

IsAccessible

public bool IsAccessible { get; set; }

Property Value

Boolean

IsMirrored

public bool IsMirrored { get; }

Property Value

Boolean

Left

public int Left { get; set; }

Property Value

Int32

Location

public Point Location { get; set; }

Property Value

Point

Margin

public Padding Margin { get; set; }

Property Value

Padding

MaximumSize

public Size MaximumSize { get; set; }

Property Value

Size

MinimumSize

public Size MinimumSize { get; set; }

Property Value

Size

Name

public string Name { get; set; }

Property Value

String

Parent

public Control Parent { get; set; }

Property Value

Control

ProductName

public string ProductName { get; }

Property Value

String

ProductVersion

public string ProductVersion { get; }

Property Value

String

RecreatingHandle

public bool RecreatingHandle { get; }

Property Value

Boolean

Region

public Region Region { get; set; }

Property Value

Region

public int Right { get; }

Property Value

Int32

RightToLeft

public RightToLeft RightToLeft { get; set; }

Property Value

RightToLeft

Site

public ISite Site { get; set; }

Property Value

ISite

Size

public Size Size { get; set; }

Property Value

Size

TabIndex

public int TabIndex { get; set; }

Property Value

Int32

TabStop

public bool TabStop { get; set; }

Property Value

Boolean

Tag

public object Tag { get; set; }

Property Value

Object

Text

public string Text { get; set; }

Property Value

String

Top

public int Top { get; set; }

Property Value

Int32

TopLevelControl

public Control TopLevelControl { get; }

Property Value

Control

UseWaitCursor

public bool UseWaitCursor { get; set; }

Property Value

Boolean

Visible

public bool Visible { get; set; }

Property Value

Boolean

Width

public int Width { get; set; }

Property Value

Int32

WindowTarget

public IWindowTarget WindowTarget { get; set; }

Property Value

IWindowTarget

PreferredSize

public Size PreferredSize { get; }

Property Value

Size

Padding

public Padding Padding { get; set; }

Property Value

Padding

ImeMode

public ImeMode ImeMode { get; set; }

Property Value

ImeMode

Container

public IContainer Container { get; }

Property Value

IContainer

Constructors

MapView()

public MapView()

MapView(Int32, Int32)

public MapView(int width, int height)

Parameters

width Int32

height Int32

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.

Pan(Single, Int32)

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

public void Pan(float degree, int percentage)

Parameters

degree Single
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.

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.

Pan(PanDirection, Int32)

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

public void Pan(PanDirection panDirection, int percentage)

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.

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.

Pan(Double, Double)

Pans the map by the provided screen offset.

public void Pan(double offsetScreenX, double offsetScreenY)

Parameters

offsetScreenX Double
Screen offset X to be paned.

offsetScreenY Double
Screen offset Y to be paned.

CenterAt(PointShape)

Locates the map center to the specified world point.

public void CenterAt(PointShape worldPoint)

Parameters

worldPoint PointShape
A world point to locate the map.

CenterAt(ScreenPointF)

Locates the map center to the specified screen point.

public void CenterAt(ScreenPointF screenPoint)

Parameters

screenPoint ScreenPointF
A screen point to locate the map.

CenterAt(Feature)

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

public void CenterAt(Feature centerFeature)

Parameters

centerFeature Feature
A feature to locates the map center.

CenterAt(Single, Single)

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

public void CenterAt(float screenX, float screenY)

Parameters

screenX Single
Screen x to locate the map center.

screenY Single
Screen y to locate the map center.

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.

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
GeoImage's Width

height Int32
GeoImage's Height

Returns

GeoImage

GetSnapshot()

Get current map snapshot

public GeoImage GetSnapshot()

Returns

GeoImage

ToggleMapExtents()

Toggles the map between current extent and previous extent.

public void ToggleMapExtents()

ZoomToPreviousExtent()

Zooms the map to the previous extent.

public void ZoomToPreviousExtent()

ZoomToNextExtent()

Zooms the map to the next extent.

public void ZoomToNextExtent()

SaveState()

This method saves map state to a byte array.

public Byte[] SaveState()

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.

OnMapKeyUp(KeyEventArgs)

Occurs when key up on the map.

protected void OnMapKeyUp(KeyEventArgs e)

Parameters

e KeyEventArgs
Event argument for MapKeyUp event.

OnMapKeyDown(KeyEventArgs)

Occurs when key press down on the map.

protected void OnMapKeyDown(KeyEventArgs e)

Parameters

e KeyEventArgs
Event argument for MapKeyDown event.

OnMapMouseMove(MouseEventArgs)

Occurs when mouse moving on the map.

protected void OnMapMouseMove(MouseEventArgs e)

Parameters

e MouseEventArgs
Event argument for MapMouseMove event.

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.

Refresh(OverlayRefreshType)

Refreshes current map control.

public void Refresh(OverlayRefreshType refreshType)

Parameters

refreshType OverlayRefreshType
Indicates where the existing tiles will be refreshed.

Remarks:

Refreshes all the existing overlays and map tools.

Refresh(RectangleShape, OverlayRefreshType)

public void Refresh(RectangleShape extent, OverlayRefreshType refreshType)

Parameters

extent RectangleShape

refreshType OverlayRefreshType

Refresh(Overlay, OverlayRefreshType)

public void Refresh(Overlay overlay, OverlayRefreshType refreshType)

Parameters

overlay Overlay

refreshType OverlayRefreshType

Refresh(IEnumerable<Overlay>, OverlayRefreshType)

Refreshes a specified overlay collection.

public void Refresh(IEnumerable<Overlay> overlays, OverlayRefreshType refreshType)

Parameters

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

refreshType OverlayRefreshType

Refresh(RectangleShape, Overlay, OverlayRefreshType)

public void Refresh(RectangleShape extent, Overlay overlay, OverlayRefreshType refreshType)

Parameters

extent RectangleShape

overlay Overlay

refreshType OverlayRefreshType

Refresh(RectangleShape, IEnumerable<Overlay>, OverlayRefreshType)

public void Refresh(RectangleShape extent, IEnumerable<Overlay> overlays, OverlayRefreshType refreshType)

Parameters

extent RectangleShape

overlays IEnumerable<Overlay>

refreshType OverlayRefreshType

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.

ZoomIn()

Zooms the map in for one level

public void ZoomIn()

ZoomIn(Int32)

Zooms the map in by the provided percentage.

public void ZoomIn(int percentage)

Parameters

percentage Int32
A scale to zoom the map in.

ZoomIntoCenter(Int32, Feature)

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

public void ZoomIntoCenter(int percentage, Feature centerFeature)

Parameters

percentage Int32
A scale to zoom the map in.

centerFeature Feature
A new center feature of current map.

ZoomIntoCenter(Int32, PointShape)

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

public void ZoomIntoCenter(int percentage, PointShape worldPoint)

Parameters

percentage Int32
A scale to zoom the map in.

worldPoint PointShape
A new center of current map.

ZoomIntoCenter(Int32, ScreenPointF)

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

public void ZoomIntoCenter(int percentage, ScreenPointF screenPoint)

Parameters

percentage Int32
A scale to zoom the map in.

screenPoint ScreenPointF
A new screen center to locate the map.

ZoomIntoCenter(Int32, Single, Single)

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

public void ZoomIntoCenter(int percentage, float screenX, float screenY)

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.

ZoomTo(PointShape, Double)

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

public void ZoomTo(PointShape targetWorldCenter, double targetScale)

Parameters

targetWorldCenter PointShape
A world center to zoom the map to.

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

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.

ZoomOut()

Zooms the map out for one level.

public void ZoomOut()

ZoomOut(Int32)

Zooms the map out by the provided percentage.

public void ZoomOut(int percentage)

Parameters

percentage Int32
A scale to zoom the map out.

ZoomOutToCenter(Int32, Feature)

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

public void ZoomOutToCenter(int percentage, Feature centerFeature)

Parameters

percentage Int32
A scale to zoom the map out.

centerFeature Feature
A new center feature of current map.

ZoomOutToCenter(Int32, PointShape)

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

public void ZoomOutToCenter(int percentage, PointShape worldPoint)

Parameters

percentage Int32
A scale to zoom the map out.

worldPoint PointShape
A new center of current map.

ZoomOutToCenter(Int32, ScreenPointF)

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

public void ZoomOutToCenter(int percentage, ScreenPointF screenPoint)

Parameters

percentage Int32
A scale to zoom the map out.

screenPoint ScreenPointF
A new screen center to locate the map.

ZoomOutToCenter(Int32, Single, Single)

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

public void ZoomOutToCenter(int percentage, float screenX, float screenY)

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.

ZoomToScale(Double)

Zooms the map to a provided scale.

public void ZoomToScale(double targetScale)

Parameters

targetScale Double
Target scale to zoom the map.

ZoomToScale(Double, ScreenPointF)

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

public void ZoomToScale(double targetScale, ScreenPointF offsetScreenPoint)

Parameters

targetScale Double
Target scale to zoom the map.

offsetScreenPoint ScreenPointF
An screen offset to locate the map.

ZoomToScale(Double, Single, Single)

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

public void ZoomToScale(double targetScale, float offsetScreenX, float offsetScreenY)

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.

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.

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.

Events

MapKeyUp

Occurs when key press up on the map.

public event EventHandler<KeyEventArgs> MapKeyUp;

MapKeyDown

Occurs when key press down on the map.

public event EventHandler<KeyEventArgs> MapKeyDown;

MapMouseMove

Occurs when moving mouse on the map.

public event EventHandler<MouseEventArgs> MapMouseMove;

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;

ChildChanged

public event EventHandler<ChildChangedEventArgs> ChildChanged;

BindingContextChanged

public event EventHandler BindingContextChanged;

Click

public event EventHandler Click;

ClientSizeChanged

public event EventHandler ClientSizeChanged;

ControlAdded

public event ControlEventHandler ControlAdded;

ControlRemoved

public event ControlEventHandler ControlRemoved;

CursorChanged

public event EventHandler CursorChanged;

DoubleClick

public event EventHandler DoubleClick;

DragDrop

public event DragEventHandler DragDrop;

DragEnter

public event DragEventHandler DragEnter;

DragLeave

public event EventHandler DragLeave;

DragOver

public event DragEventHandler DragOver;

Enter

public event EventHandler Enter;

FontChanged

public event EventHandler FontChanged;

ForeColorChanged

public event EventHandler ForeColorChanged;

GiveFeedback

public event GiveFeedbackEventHandler GiveFeedback;

GotFocus

public event EventHandler GotFocus;

Invalidated

public event InvalidateEventHandler Invalidated;

KeyDown

public event KeyEventHandler KeyDown;

KeyPress

public event KeyPressEventHandler KeyPress;

KeyUp

public event KeyEventHandler KeyUp;

Layout

public event LayoutEventHandler Layout;

Leave

public event EventHandler Leave;

LostFocus

public event EventHandler LostFocus;

MouseCaptureChanged

public event EventHandler MouseCaptureChanged;

MouseClick

public event MouseEventHandler MouseClick;

MouseDoubleClick

public event MouseEventHandler MouseDoubleClick;

MouseDown

public event MouseEventHandler MouseDown;

MouseEnter

public event EventHandler MouseEnter;

MouseHover

public event EventHandler MouseHover;

MouseLeave

public event EventHandler MouseLeave;

MouseMove

public event MouseEventHandler MouseMove;

MouseUp

public event MouseEventHandler MouseUp;

MouseWheel

public event MouseEventHandler MouseWheel;

PaddingChanged

public event EventHandler PaddingChanged;

Paint

public event PaintEventHandler Paint;

PreviewKeyDown

public event PreviewKeyDownEventHandler PreviewKeyDown;

QueryContinueDrag

public event QueryContinueDragEventHandler QueryContinueDrag;

Resize

public event EventHandler Resize;

RightToLeftChanged

public event EventHandler RightToLeftChanged;

SizeChanged

public event EventHandler SizeChanged;

TextChanged

public event EventHandler TextChanged;

AutoSizeChanged

public event EventHandler AutoSizeChanged;

BackColorChanged

public event EventHandler BackColorChanged;

BackgroundImageChanged

public event EventHandler BackgroundImageChanged;

BackgroundImageLayoutChanged

public event EventHandler BackgroundImageLayoutChanged;

CausesValidationChanged

public event EventHandler CausesValidationChanged;

ContextMenuChanged

public event EventHandler ContextMenuChanged;

ContextMenuStripChanged

public event EventHandler ContextMenuStripChanged;

DockChanged

public event EventHandler DockChanged;

EnabledChanged

public event EventHandler EnabledChanged;

LocationChanged

public event EventHandler LocationChanged;

MarginChanged

public event EventHandler MarginChanged;

RegionChanged

public event EventHandler RegionChanged;

TabIndexChanged

public event EventHandler TabIndexChanged;

TabStopChanged

public event EventHandler TabStopChanged;

VisibleChanged

public event EventHandler VisibleChanged;

HandleCreated

public event EventHandler HandleCreated;

HandleDestroyed

public event EventHandler HandleDestroyed;

HelpRequested

public event HelpEventHandler HelpRequested;

QueryAccessibilityHelp

public event QueryAccessibilityHelpEventHandler QueryAccessibilityHelp;

DpiChangedBeforeParent

public event EventHandler DpiChangedBeforeParent;

DpiChangedAfterParent

public event EventHandler DpiChangedAfterParent;

Move

public event EventHandler Move;

ChangeUICues

public event UICuesEventHandler ChangeUICues;

StyleChanged

public event EventHandler StyleChanged;

SystemColorsChanged

public event EventHandler SystemColorsChanged;

Validating

public event CancelEventHandler Validating;

Validated

public event EventHandler Validated;

ParentChanged

public event EventHandler ParentChanged;

ImeModeChanged

public event EventHandler ImeModeChanged;

Disposed

public event EventHandler Disposed;