Map interaction

Functions

void AxMap.LockWindow (MapWinGIS.tkLockMode LockMode)
 Locks the window so that any changes will not be displayed until it is unlocked. More...
 
virtual void AxMap.Undo ()
 Reverts the last operation performed by user in interactive shape editor. More...
 
void AxMap.ZoomIn (double Percent)
 Zooms the display in by the given factor. More...
 
void AxMap.ZoomOut (double Percent)
 Zooms the display out by the specified factor. More...
 
void AxMap.ZoomToLayer (int LayerHandle)
 Zooms the map display to the specified layer. More...
 
void AxMap.ZoomToMaxExtents ()
 Zooms the map to the maximum extents of all loaded layers.
More...
 
void AxMap.ZoomToMaxVisibleExtents ()
 Zooms the map to the maximum extents of all loaded visible layers. More...
 
int AxMap.ZoomToPrev ()
 Zooms the map view to the previous extents if there are previous extents in the extents history. More...
 
bool AxMap.ZoomToSelected (int layerHandle)
 Zoomes map to display selected shapes of the specified shapefile. More...
 
void AxMap.ZoomToShape (int LayerHandle, int Shape)
 Zooms the map display to the specified shape in the shapefile contained by the specified layer. More...
 
bool AxMap.ZoomToTileLevel (int zoom)
 Zooms map to specified zoom level of the active tile provider (Map.Tiles.Provider). More...
 
bool AxMap.ZoomToWorld ()
 Zooms to World extents (-180.0; 180.0; -90.0; 90.0) More...
 

Properties

tkCustomState AxMap.AnimationOnZooming [get, set]
 Gets or sets a value indicating whether animation will be displayed zooming map in or out. More...
 
MapWinGIS.tkCursorMode AxMap.CursorMode [get, set]
 Gets or sets the cursor mode for the map. More...
 
bool AxMap.DisableWaitCursor [get, set]
 Gets or sets a boolean value which indicates whether a wait cursor will be displayed on map redraw. More...
 
tkCustomState AxMap.InertiaOnPanning [get, set]
 Gets or sets a value indicating whether animation will be displayed to simulate inertia after panning operation. More...
 
MapWinGIS.tkLockMode AxMap.IsLocked [get, set]
 Checks to see if the map is currently locked or not. More...
 
double AxMap.MouseWheelSpeed [get, set]
 Gets or sets the speed of zooming with mouse wheel. More...
 
bool AxMap.RecenterMapOnZoom [get, set]
 Gets or sets a value indicating whether to move the mouse click point to the center of the map when using the Zoom In or Zoom Out tools. More...
 
bool AxMap.ReuseTileBuffer [get, set]
 Gets or sets a value indicating whether currently rendered tile buffer should be scaled and reused during the next redraw. More...
 
bool AxMap.SendMouseDown [get, set]
 Gets or sets whether the map sends mouse down events. More...
 
bool AxMap.SendMouseMove [get, set]
 Gets or sets whether the map sends mouse move events. More...
 
bool AxMap.SendMouseUp [get, set]
 Gets or sets whether the map sends mouse up events. More...
 
bool AxMap.SendOnDrawBackBuffer [get, set]
 Gets or sets a boolean value which indicates whether the map sends on draw back buffer events. More...
 
bool AxMap.SendSelectBoxDrag [get, set]
 Gets or sets whether the map sends the SelectBoxDrag event. More...
 
bool AxMap.SendSelectBoxFinal [get, set]
 Gets or sets whether the map sends the SelectBoxFinal event. More...
 
bool AxMap.ShowZoomBar [get, set]
 Gets or sets a value indicating whether zoom bar will be displayed on the map. More...
 
bool AxMap.TrapRMouseDown [get, set]
 Gets or sets a boolean value which can affect the displaying of the context menus in client code by the right click. More...
 
bool AxMap.UseAlternatePanCursor [get, set]
 Gets or sets a value indicating whether the legacy 'hand' cursor should be used for map panning rather than the standard 'NSEW' four-point cursor. More...
 
bool AxMap.UseSeamlessPan [get, set]
 Gets or sets a boolean value which indicate whether map will be redrawn in the course of panning operation. More...
 
int AxMap.ZoomBarMaxZoom [get, set]
 Gets or sets maximum zoom level to be used by zoom bar. More...
 
int AxMap.ZoomBarMinZoom [get, set]
 Gets or sets minimum zoom level to be used by zoom bar. More...
 
tkZoomBarVerbosity AxMap.ZoomBarVerbosity [get, set]
 Gets or sets the amount of information to be displayed in zoom bar tool tip. More...
 
tkZoomBehavior AxMap.ZoomBehavior [get, set]
 Gets or sets zoom behaviour for the map control. More...
 
tkZoomBoxStyle AxMap.ZoomBoxStyle [get, set]
 Gets or sets a style of zoom box, which is used to select a region with Zoom In tool. More...
 
double AxMap.ZoomPercent [get, set]
 Gets or sets the factor by which to zoom the view of the map in or out. More...
 

Detailed Description

Here is a list of properties and methods which affect the way a user interacts with the map. This module is a part of the documentation of AxMap class.

dot_inline_dotgraph_3.png

Graph description

Function Documentation

◆ LockWindow()

void AxMap.LockWindow ( MapWinGIS.tkLockMode  LockMode)

Locks the window so that any changes will not be displayed until it is unlocked.

This is very useful if you are making a large number of changes at once and don't want the map to be redrawn between each change. The changes of drawing options in the related classes (Shapefile, Labels, etc.) won't cause the redraw of the map even if it's not locked.

Parameters
LockModeThe state of the lock mode.
Examples:
AddLayers.cs, ShapefileToDrawingLayer.cs, and SortLayers.cs.

◆ Undo()

virtual void AxMap.Undo ( )
virtual

Reverts the last operation performed by user in interactive shape editor.

This method is preferable over AxMap.UndoList.Undo since it can also undo point added during creation of new shape, which are not registered in the undo list.

New API 4.9.3:
Added in version 4.9.3

◆ ZoomIn()

void AxMap.ZoomIn ( double  Percent)

Zooms the display in by the given factor.

Parameters
PercentThe factor to zoom in by.

◆ ZoomOut()

void AxMap.ZoomOut ( double  Percent)

Zooms the display out by the specified factor.

Parameters
PercentThe factor to zoom out by.

◆ ZoomToLayer()

void AxMap.ZoomToLayer ( int  LayerHandle)

Zooms the map display to the specified layer.

Parameters
LayerHandleThe handle of the layer to zoom to.
Examples:
CreatePolygonShapefile.cs, PolygonsWithHoles.cs, and TrackCars.cs.

◆ ZoomToMaxExtents()

void AxMap.ZoomToMaxExtents ( )

Zooms the map to the maximum extents of all loaded layers.

Layers which are not visible are still used to compute maximum extents.

Examples:
IntersectionLength.cs, Segmentation.cs, SelectByDistance.cs, SplitByAttribute.cs, and TrackCars.cs.

◆ ZoomToMaxVisibleExtents()

void AxMap.ZoomToMaxVisibleExtents ( )

Zooms the map to the maximum extents of all loaded visible layers.

Layers which are not visible are not used to compute maximum extents.

◆ ZoomToPrev()

int AxMap.ZoomToPrev ( )

Zooms the map view to the previous extents if there are previous extents in the extents history.

Returns
Returns the number of extents left in the extents history after zooming to previous extents.

◆ ZoomToSelected()

bool AxMap.ZoomToSelected ( int  layerHandle)

Zoomes map to display selected shapes of the specified shapefile.

Parameters
layerHandleLayer handle of shapefile layer with selected shapes.
Returns
True on success.

If the layer isn't shapefile or there is no selected shapes in it, nothing will happen.

New API 4.9.0:
Added in version 4.9.0
Examples:
SelectByQuery.cs.

◆ ZoomToShape()

void AxMap.ZoomToShape ( int  LayerHandle,
int  Shape 
)

Zooms the map display to the specified shape in the shapefile contained by the specified layer.

Parameters
LayerHandleThe handle of the layer containing the shape to zoom to.
ShapeThe index of the shape to zoom to.
Examples:
ZoomToValues.cs.

◆ ZoomToTileLevel()

bool AxMap.ZoomToTileLevel ( int  zoom)

Zooms map to specified zoom level of the active tile provider (Map.Tiles.Provider).

Parameters
zoomZoom
Returns
True if the zooming took place.
New API 4.9.1:
Added in version 4.9.1

◆ ZoomToWorld()

bool AxMap.ZoomToWorld ( )

Zooms to World extents (-180.0; 180.0; -90.0; 90.0)

Projection should be specified for map in order for this methods to work.

Returns
True on success.
New API 4.9.0:
Added in version 4.9.0

Properties

◆ AnimationOnZooming

tkCustomState AxMap.AnimationOnZooming
getset

Gets or sets a value indicating whether animation will be displayed zooming map in or out.

Default csAuto value will display animation only if there are no data layers within visisble extents. Animation also won't be displayed if there are more than 4 zoom levels between current and target level.

New API 4.9.2:
Added in version 4.9.2

◆ CursorMode

MapWinGIS.tkCursorMode AxMap.CursorMode
getset

Gets or sets the cursor mode for the map.

The cursor mode determines how the map handles mouse click events on the map. The only mode not handled by the map is cmNone.

Examples:
EditAttributes.cs, LabelSelection.cs, MarkPoints.cs, RemoveShape.cs, SelectBox.cs, ShowAttributes.cs, ToolTip.cs, and ZoomToValues.cs.

◆ DisableWaitCursor

bool AxMap.DisableWaitCursor
getset

Gets or sets a boolean value which indicates whether a wait cursor will be displayed on map redraw.

Examples:
TrackCars.cs, and Tracking.cs.

◆ InertiaOnPanning

tkCustomState AxMap.InertiaOnPanning
getset

Gets or sets a value indicating whether animation will be displayed to simulate inertia after panning operation.

Default csAuto value will display animation only if there are no data layers within visisble extents.

Note
Mouse panning is somewhat more tricky than the one with smartphone's touch screen, so some practice may be needed to learn not to stop mouse motion before releasing the button )))
New API 4.9.2:
Added in version 4.9.2

◆ IsLocked

MapWinGIS.tkLockMode AxMap.IsLocked
getset

Checks to see if the map is currently locked or not.

◆ MouseWheelSpeed

double AxMap.MouseWheelSpeed
getset

Gets or sets the speed of zooming with mouse wheel.

The default values is 0.5. The values in 0.1 - 10.0 range are accepted. The value 1.0 will turn off the zooming by mouse wheel.

◆ RecenterMapOnZoom

bool AxMap.RecenterMapOnZoom
getset

Gets or sets a value indicating whether to move the mouse click point to the center of the map when using the Zoom In or Zoom Out tools.

The default value is False, indicating that the map is not recentered,
but instead keeps the click point at the mouse position and zooms around that point.

New API 4.9.5:
Added in version 4.9.5

◆ ReuseTileBuffer

bool AxMap.ReuseTileBuffer
getset

Gets or sets a value indicating whether currently rendered tile buffer should be scaled and reused during the next redraw.

New API 4.9.2:
Added in version 4.9.2

◆ SendMouseDown

bool AxMap.SendMouseDown
getset

Gets or sets whether the map sends mouse down events.

Examples:
EditAttributes.cs, LabelSelection.cs, MarkPoints.cs, RemoveShape.cs, and ZoomToValues.cs.

◆ SendMouseMove

bool AxMap.SendMouseMove
getset

Gets or sets whether the map sends mouse move events.

Examples:
ShowAttributes.cs, and ToolTip.cs.

◆ SendMouseUp

bool AxMap.SendMouseUp
getset

Gets or sets whether the map sends mouse up events.

◆ SendOnDrawBackBuffer

bool AxMap.SendOnDrawBackBuffer
getset

Gets or sets a boolean value which indicates whether the map sends on draw back buffer events.

◆ SendSelectBoxDrag

bool AxMap.SendSelectBoxDrag
getset

Gets or sets whether the map sends the SelectBoxDrag event.

◆ SendSelectBoxFinal

bool AxMap.SendSelectBoxFinal
getset

Gets or sets whether the map sends the SelectBoxFinal event.

Examples:
LabelSelection.cs, and SelectBox.cs.

◆ ShowZoomBar

bool AxMap.ShowZoomBar
getset

Gets or sets a value indicating whether zoom bar will be displayed on the map.

Zoom bar can be displayed only if projection of the map is set. Zoom levels depend upon tile of the current tile provider.

/see AxMap.TileProvider, AxMap.Projection

New API 4.9.2:
Added in version 4.9.2

◆ TrapRMouseDown

bool AxMap.TrapRMouseDown
getset

Gets or sets a boolean value which can affect the displaying of the context menus in client code by the right click.

◆ UseAlternatePanCursor

bool AxMap.UseAlternatePanCursor
getset

Gets or sets a value indicating whether the legacy 'hand' cursor should be used for map panning rather than the standard 'NSEW' four-point cursor.

New API 4.9.5:
Added in version 4.9.5

◆ UseSeamlessPan

bool AxMap.UseSeamlessPan
getset

Gets or sets a boolean value which indicate whether map will be redrawn in the course of panning operation.

The default value is false. Setting this value to true can improve the user experience but decrease the performance in case large layers are displayed.

New API 4.8:
Added in version 4.8

◆ ZoomBarMaxZoom

int AxMap.ZoomBarMaxZoom
getset

Gets or sets maximum zoom level to be used by zoom bar.

This property won't increase the number of available levels, if certain levels aren't supported by the provider they still won't be displayed.

New API 4.9.2:
Added in version 4.9.2

◆ ZoomBarMinZoom

int AxMap.ZoomBarMinZoom
getset

Gets or sets minimum zoom level to be used by zoom bar.

This property won't increase the number of available levels, if certain levels aren't supported by the provider they still won't be displayed.

New API 4.9.2:
Added in version 4.9.2

◆ ZoomBarVerbosity

tkZoomBarVerbosity AxMap.ZoomBarVerbosity
getset

Gets or sets the amount of information to be displayed in zoom bar tool tip.

New API 4.9.2:
Added in version 4.9.2

◆ ZoomBehavior

tkZoomBehavior AxMap.ZoomBehavior
getset

Gets or sets zoom behaviour for the map control.

New API 4.9.1:
Added in version 4.9.1
Examples:
TrackCars.cs.

◆ ZoomBoxStyle

tkZoomBoxStyle AxMap.ZoomBoxStyle
getset

Gets or sets a style of zoom box, which is used to select a region with Zoom In tool.

New API 4.9.2:
Added in version 4.9.2

◆ ZoomPercent

double AxMap.ZoomPercent
getset

Gets or sets the factor by which to zoom the view of the map in or out.