Map events

Events

_DMapEvents_AfterDrawingEventHandler AxMap.AfterDrawing
 This event is fired after the rendering of drawing layers. Handle of device context is passed to allow the user to implement custom drawing. More...
 
_DMapEvents_AfterLayersEventHandler AxMap.AfterLayers
 This event is fired after the rendering of standard layers. Handle of device context is passed to allow the user to implement custom drawing. More...
 
_DMapEvents_AfterShapeEditEventHandler AxMap.AfterShapeEdit
 This event is fired after interactive editing of shape is finished (AxMap.CursorMode is set to tkCursorMode.cmEditShape). More...
 
_DMapEvents_BackgroundLoadingFinishedEventHandler AxMap.BackgroundLoadingFinished
 This event is fired when background loading of data for OgrLayer finishes. More...
 
_DMapEvents_BackgroundLoadingStartedEventHandler AxMap.BackgroundLoadingStarted
 This event is fired when background loading of data for OgrLayer starts. More...
 
_DMapEvents_BeforeDeleteShapeEventHandler AxMap.BeforeDeleteShape
 This event is fired before shape is deleted in interactive ShapeEditor. More...
 
_DMapEvents_BeforeDrawingEventHandler AxMap.BeforeDrawing
 This event is fired before the rendering of drawing layers. Handle of device context is passed to allow the user to implement custom drawing. More...
 
_DMapEvents_BeforeLayersEventHandler AxMap.BeforeLayers
 This event is fired before the rendering of standard layers. Handle of device context is passed to allow the user to implement custom drawing. More...
 
_DMapEvents_BeforeShapeEditEventHandler AxMap.BeforeShapeEdit
 This event is fired before editing starts for particular shape (after user click on the shape when map cursor is set to tkCursorMode.cmEditShape). More...
 
_DMapEvents_BeforeVertexDigitizedEventHandler AxMap.BeforeVertexDigitized
 This event is fired after the user digitized a new point and held the ALT button. Can be used to modify the coordinates. More...
 
_DMapEvents_ChooseLayerEventHandler AxMap.ChooseLayer
 The event is fired when current map tool asks for the layer to work with. More...
 
EventHandler AxMap.DblClick
 The event is fired when user performs double click with left mouse button while cursor is within the map control. More...
 
EventHandler AxMap.ExtentsChanged
 This event is fired when the extents of the map change. More...
 
_DMapEvents_FileDroppedEventHandler AxMap.FileDropped
 This event is fired when a user drags a file and drops it on the map. More...
 
_DMapEvents_GridOpenedEventHandler AxMap.GridOpened
 This event is fired after grid datasource was added to the map (AxMap.AddLayer). More...
 
_DMapEvents_LayerAddedEventHandler AxMap.LayerAdded
 This event is fired when a new layer has been added to the map. More...
 
_DMapEvents_LayerProjectionIsEmptyEventHandler AxMap.LayerProjectionIsEmpty
 This event is fired when a new layer has been added to the map and it has no metadata about its coordinate system and projection. More...
 
_DMapEvents_LayerRemovedEventHandler AxMap.LayerRemoved
 This event is fired when a layer has been removed from map. More...
 
_DMapEvents_LayerReprojectedEventHandler AxMap.LayerReprojected
 This event is fired after a layer was reprojected (its original projection was different from the map projection). More...
 
_DMapEvents_LayerReprojectedIncompleteEventHandler AxMap.LayerReprojectedIncomplete
 This event is fired when a layer was not fully reprojected. It is controlled by the GlobalSettings.AllowLayersWithIncompleteReprojection property. More...
 
_DMapEvents_MapStateEventHandler AxMap.MapState
 This event is fired for each layer in the map when the map state is changed. More...
 
_DMapEvents_MeasuringChangedEventHandler AxMap.MeasuringChanged
 This event is fired after the user adds or removes a point from the path of Measuring tool. More...
 
_DMapEvents_MouseDownEventHandler AxMap.MouseDown
 This event is fired when a user has pressed a mouse button while the cursor is inside the map control. The map property AxMap.SendMouseDown must be set to True for this event to be fired. More...
 
_DMapEvents_MouseMoveEventHandler AxMap.MouseMove
 This event is fired when the mouse is moved while the cursor is inside the map control. The map property AxMap.SendMouseMove must be set to True for this event to be fired. More...
 
_DMapEvents_MouseUpEventHandler AxMap.MouseUp
 This event is fired when the mouse button is released while the cursor is in the map control. The map property AxMap.SendMouseUp must be set to True for this event to be fired. More...
 
_DMapEvents_OnDrawBackBufferEventHandler AxMap.OnDrawBackBuffer
 This event is fired during the rendering of map after data layers and drawing layers were rendered. The map property AxMap.SendOnDrawBackBuffer must be set to True for this event to be fired. More...
 
_DMapEvents_OnDrawBackBuffer2EventHandler AxMap.OnDrawBackBuffer2
 Special version of _DMapEvents.OnDrawBackBuffer More...
 
EventHandler AxMap.ProjectionChanged
 The event is fired when projection of the map control was changed. More...
 
_DMapEvents_ProjectionMismatchEventHandler AxMap.ProjectionMismatch
 This event is fired when a layer was added to the map with projection / coordinate system different from those of the map control. More...
 
_DMapEvents_SelectBoxDragEventHandler AxMap.SelectBoxDrag
 This event is fired while the user is dragging a selection box in the map control. The map property AxMap.SendSelectBoxDrag must be set to True for this event to be fired. More...
 
_DMapEvents_SelectBoxFinalEventHandler AxMap.SelectBoxFinal
 This event is fired when the user finishes dragging a selection box in the map control. The map property AxMap.SendSelectBoxFinal must be set to True for this event to be fired. More...
 
_DMapEvents_SelectionChangedEventHandler AxMap.SelectionChanged
 This event is fired after shapes were selected with tkCursorMode.cmSelection tool. More...
 
_DMapEvents_ShapeHighlightedEventHandler AxMap.ShapeHighlighted
 This event is fired when mouse cursor is being moved by user and the cursor enters or leaves neighborhood of particular shape. More...
 
_DMapEvents_ShapeIdentifiedEventHandler AxMap.ShapeIdentified
 This event is fired when user click on a shape with tkCursorMode.cmIdentify tool active. More...
 
_DMapEvents_ShapeValidationFailedEventHandler AxMap.ShapeValidationFailed
 This event is fired when shape being created or edited has topological errors and therefore can't be saved to the layer. More...
 
_DMapEvents_SnapPointFoundEventHandler AxMap.SnapPointFound
 This event is fired after a snap point was found either by the default snapping algorithm of MapWinGIS or by a SnapPointRequested handler. Setting the snappedX and snappedY allows you to override this result (use with care!). More...
 
_DMapEvents_SnapPointRequestedEventHandler AxMap.SnapPointRequested
 This event is fired whenever a snap point is requested by the map before the MapWinGIS snap algorithm was run. If the isFinal flag is set to true, the default snapping algorithm of MapWinGIS will be skipped. More...
 
_DMapEvents_TilesLoadedEventHandler AxMap.TilesLoaded
 This event is fired when complete set of tiles has been loaded for the new map extents. More...
 
EventHandler AxMap.UndoListChanged
 This event is fired when an operations is added or removed from undo/redo list of interactive ShapeEditor. More...
 
_DMapEvents_ValidateShapeEventHandler AxMap.ValidateShape
 This event is fired before a shape which is being created or edited is about to be saved back to the layer. More...
 

Detailed Description

dot_inline_dotgraph_19.png

Graph description

Events

◆ AfterDrawing

_DMapEvents_AfterDrawingEventHandler AxMap.AfterDrawing

This event is fired after the rendering of drawing layers. Handle of device context is passed to allow the user to implement custom drawing.

Parameters
hdcHandle of device context of screen buffer.
xMinMinimum X coordinate of the rectangle being rendered.
xMaxMaximum X coordinate of the rectangle being rendered.
yMinMinimum Y coordinate of the rectangle being rendered.
yMaxMaximum Y coordinate of the rectangle being rendered.
handledPassed by reference. The value should be set to tkMwBoolean.blnTrue in case some additional drawing is performed in client code.

◆ AfterLayers

_DMapEvents_AfterLayersEventHandler AxMap.AfterLayers

This event is fired after the rendering of standard layers. Handle of device context is passed to allow the user to implement custom drawing.

Parameters
hdcHandle of device context of screen buffer.
xMinMinimum X coordinate of the rectangle being rendered.
xMaxMaximum X coordinate of the rectangle being rendered.
yMinMinimum Y coordinate of the rectangle being rendered.
yMaxMaximum Y coordinate of the rectangle being rendered.
handledPassed by reference. The value should be set to tkMwBoolean.blnTrue in case some additional drawing is performed in client code.
New API 4.9.5:
Added in version 4.9.5

◆ AfterShapeEdit

_DMapEvents_AfterShapeEditEventHandler AxMap.AfterShapeEdit

This event is fired after interactive editing of shape is finished (AxMap.CursorMode is set to tkCursorMode.cmEditShape).

Parameters
operationThe type of editing operation that was performed.
layerHandleHandle of the layer the shape being edited belongs to.
shapeIndexIndex of the shape withing layer.

The common use of the event is set attributes of the shape, update its label or style. The operation parameter can be one of the following values: tkUndoOperation.uoAddShape, tkUndoOperation.uoRemoveShape, tkUndoOperation.uoEditShape.

◆ BackgroundLoadingFinished

_DMapEvents_BackgroundLoadingFinishedEventHandler AxMap.BackgroundLoadingFinished

This event is fired when background loading of data for OgrLayer finishes.

Parameters
taskIdUnique Id of the loading task.
layerHandleHandle of the layer the loading is peformed for.
numFeaturesNumber of features within current map extents.
numLoadedNumber of features that were actually loaded.

The loading task may be finished without any features being loaded under the following circumstances:

  • number of features within current extents is larger than GlobalSettings.OgrLayerMaxFeatureCount parameter;
  • the extents of map have been changed since the loading was started so the data being loaded is no longer needed;
  • there is a problem with accessing the datasource (e.g. lost network connection).
    In case of failure, i.e. (numLoaded = 0) the event will be fired from background thread. In case of success - from the main thread before the rendering of the loaded data.

◆ BackgroundLoadingStarted

_DMapEvents_BackgroundLoadingStartedEventHandler AxMap.BackgroundLoadingStarted

This event is fired when background loading of data for OgrLayer starts.

Parameters
taskIdUnique Id of the loading task, which can be tracked down in AxMap.BackgroundLoadingFinished to determine the results of the operation.
layerHandleHandle of the layer loading starts for.

The event is fired after map extents change for each OgrLayer with OgrLayer.DynamicLoading proprety set to true, when the layer doesn't have the necessary data in its buffer (OgrLayer.GetBuffer). The event can be used to display some kind of loading indicator to notify the user that some data is still being loaded.

◆ BeforeDeleteShape

_DMapEvents_BeforeDeleteShapeEventHandler AxMap.BeforeDeleteShape

This event is fired before shape is deleted in interactive ShapeEditor.

Parameters
targetWhat element of shape (whole shape, part, single vertex) is to be deleted.
cancelPassed by reference. To cancel the operation this value should be set to tkMwBoolean.blnTrue.

This event is fired when shape (or some of its elements) is selected in ShapeEditor (AxMap.CursorMode = tkCursorMode.cmEditShape) and user presses Delete button. The common use of his event is to display a message box asking the user whether the operation should be performed.

◆ BeforeDrawing

_DMapEvents_BeforeDrawingEventHandler AxMap.BeforeDrawing

This event is fired before the rendering of drawing layers. Handle of device context is passed to allow the user to implement custom drawing.

Parameters
hdcHandle of device context of screen buffer.
xMinMinimum X coordinate of the rectangle being rendered.
xMaxMaximum X coordinate of the rectangle being rendered.
yMinMinimum Y coordinate of the rectangle being rendered.
yMaxMaximum Y coordinate of the rectangle being rendered.
handledPassed by reference. The value should be set to tkMwBoolean.blnTrue in case some additional drawing is performed in client code.

◆ BeforeLayers

_DMapEvents_BeforeLayersEventHandler AxMap.BeforeLayers

This event is fired before the rendering of standard layers. Handle of device context is passed to allow the user to implement custom drawing.

Parameters
hdcHandle of device context of screen buffer.
xMinMinimum X coordinate of the rectangle being rendered.
xMaxMaximum X coordinate of the rectangle being rendered.
yMinMinimum Y coordinate of the rectangle being rendered.
yMaxMaximum Y coordinate of the rectangle being rendered.
handledPassed by reference. The value should be set to tkMwBoolean.blnTrue in case some additional drawing is performed in client code.
New API 4.9.5:
Added in version 4.9.5

◆ BeforeShapeEdit

_DMapEvents_BeforeShapeEditEventHandler AxMap.BeforeShapeEdit

This event is fired before editing starts for particular shape (after user click on the shape when map cursor is set to tkCursorMode.cmEditShape).

Parameters
layerHandleHandle of the layer the shape was selected from.
shapeIndexIndex of shape to be edited.
cancelPassed by reference. Allows user to cancel the editing operations by setting the value to tkMwBoolean.blnTrue.

◆ BeforeVertexDigitized

_DMapEvents_BeforeVertexDigitizedEventHandler AxMap.BeforeVertexDigitized

This event is fired after the user digitized a new point and held the ALT button. Can be used to modify the coordinates.

Parameters
pointXX coordinate
pointYY coordinate
New API 5.1:
Added in version 5.1.0

◆ ChooseLayer

_DMapEvents_ChooseLayerEventHandler AxMap.ChooseLayer

The event is fired when current map tool asks for the layer to work with.

Parameters
xProjX coordinate of mouse click in map coordinates (if the event was triggered by mouse click).
yProjY coordinate of mouse click in map coordinates (if the event was triggered by mouse click).
layerHandlePassed by reference. Handle of the layer to apply the tool to should be set.

LayerHandle parameter in most cases is initially set to -1, which means "layer not defined". If this value is left unchanged the pending operation won't be preformed. Further details are provided in description of particular tools.

◆ DblClick

EventHandler AxMap.DblClick

The event is fired when user performs double click with left mouse button while cursor is within the map control.

◆ ExtentsChanged

EventHandler AxMap.ExtentsChanged

This event is fired when the extents of the map change.

◆ FileDropped

_DMapEvents_FileDroppedEventHandler AxMap.FileDropped

This event is fired when a user drags a file and drops it on the map.

Parameters
filenameThe filename of the file dropped on the map.

◆ GridOpened

_DMapEvents_GridOpenedEventHandler AxMap.GridOpened

This event is fired after grid datasource was added to the map (AxMap.AddLayer).

Parameters
layerHandleHandle of the layer.
gridFilenameThe filename of the original datasource.
bandIndexIndex of band which is used for visualization.
isUsingProxyWhether the datasource is rendered by Image class directly or by using an RBG image that was created to serve as proxy (Grid.CreateImageProxy).

◆ LayerAdded

_DMapEvents_LayerAddedEventHandler AxMap.LayerAdded

This event is fired when a new layer has been added to the map.

Parameters
layerHandleHandle of the newly added layer.

◆ LayerProjectionIsEmpty

_DMapEvents_LayerProjectionIsEmptyEventHandler AxMap.LayerProjectionIsEmpty

This event is fired when a new layer has been added to the map and it has no metadata about its coordinate system and projection.

Parameters
layerHandleHandle of the layer.
cancelAddingPassed by reference. The value should be set to tkMwBoolean.blnTrue to cancel the adding operation.

If this event is not handled then decision about the layer will be taken based on the value of GlobalSettings.AllowLayersWithoutProjections property.

◆ LayerRemoved

_DMapEvents_LayerRemovedEventHandler AxMap.LayerRemoved

This event is fired when a layer has been removed from map.

Parameters
layerHandleHandle of the layer.
fromRemoveAllLayersThe value will be set to true in case layer removal is caused by AxMap.RemoveAllLayers call.

◆ LayerReprojected

_DMapEvents_LayerReprojectedEventHandler AxMap.LayerReprojected

This event is fired after a layer was reprojected (its original projection was different from the map projection).

Parameters
layerHandleHandle of the layer.
successTrue in case reprojection was performed successfully.

Automatic reprojection if performed in case of projection mismatch for vector datasources. Reprojected datasource will be represented by in-memory shapefile, no disk version will be saved automatically. Raster datasource will be rejected without an attempt to reproject them. The projection mismatch behavior is controlled by the GlobalSettings.AllowProjectionMismatch, GlobalSettings.ReprojectLayersOnAdding properties.

◆ LayerReprojectedIncomplete

_DMapEvents_LayerReprojectedIncompleteEventHandler AxMap.LayerReprojectedIncomplete

This event is fired when a layer was not fully reprojected. It is controlled by the GlobalSettings.AllowLayersWithIncompleteReprojection property.

Parameters
layerHandle
numReprojected
numShapes
New API 5.1:
Added in version 5.1.0

◆ MapState

_DMapEvents_MapStateEventHandler AxMap.MapState

This event is fired for each layer in the map when the map state is changed.

Parameters
layerHandleHandle of the layer.

◆ MeasuringChanged

_DMapEvents_MeasuringChangedEventHandler AxMap.MeasuringChanged

This event is fired after the user adds or removes a point from the path of Measuring tool.

Parameters
actionParticular action (like tkMeasuringAction.PointAdded) performed by user.

◆ MouseDown

_DMapEvents_MouseDownEventHandler AxMap.MouseDown

This event is fired when a user has pressed a mouse button while the cursor is inside the map control. The map property AxMap.SendMouseDown must be set to True for this event to be fired.

Parameters
buttonMouse button that was pressed.
shiftThe shift/ctrl modifiers pressed during the creation of this event.
xX coordinate of mouse cursor position in pixels relative to controls origin.
yY coordinate of mouse cursor position in pixels relative to controls origin.

◆ MouseMove

_DMapEvents_MouseMoveEventHandler AxMap.MouseMove

This event is fired when the mouse is moved while the cursor is inside the map control. The map property AxMap.SendMouseMove must be set to True for this event to be fired.

Parameters
buttonMouse button that was pressed.
shiftThe shift/ctrl modifiers pressed during the creation of this event.
xX coordinate of mouse cursor position in pixels relative to controls origin.
yY coordinate of mouse cursor position in pixels relative to controls origin.

◆ MouseUp

_DMapEvents_MouseUpEventHandler AxMap.MouseUp

This event is fired when the mouse button is released while the cursor is in the map control. The map property AxMap.SendMouseUp must be set to True for this event to be fired.

Parameters
buttonMouse button that was pressed.
shiftThe shift/ctrl modifiers pressed during the creation of this event.
xX coordinate of mouse cursor position in pixels relative to controls origin.
yY coordinate of mouse cursor position in pixels relative to controls origin.

◆ OnDrawBackBuffer

_DMapEvents_OnDrawBackBufferEventHandler AxMap.OnDrawBackBuffer

This event is fired during the rendering of map after data layers and drawing layers were rendered. The map property AxMap.SendOnDrawBackBuffer must be set to True for this event to be fired.

Parameters
backBufferHandle of the device context of back buffer bitmap.

◆ OnDrawBackBuffer2

_DMapEvents_OnDrawBackBuffer2EventHandler AxMap.OnDrawBackBuffer2

Special version of _DMapEvents.OnDrawBackBuffer

Parameters
height
width
stride
pixelFormat
scan0

◆ ProjectionChanged

EventHandler AxMap.ProjectionChanged

The event is fired when projection of the map control was changed.

◆ ProjectionMismatch

_DMapEvents_ProjectionMismatchEventHandler AxMap.ProjectionMismatch

This event is fired when a layer was added to the map with projection / coordinate system different from those of the map control.

Parameters
layerHandleHandle of the layer.
cancelAddingPassed by reference. The value should be set to tkMwBoolean.blnTrue in case the adding of the layer should be cancelled.
reprojectPassed by reference. The value should be set to tkMwBoolean.blnTrue to instruct the control to run automatic reprojection of the layer.

◆ SelectBoxDrag

_DMapEvents_SelectBoxDragEventHandler AxMap.SelectBoxDrag

This event is fired while the user is dragging a selection box in the map control. The map property AxMap.SendSelectBoxDrag must be set to True for this event to be fired.

Parameters
leftThe left boundary of the selection box in pixel coordinates.
rightThe right boundary of the selection box in pixel coordinates.
bottomThe bottom boundary of the selection box in pixel coordinates.
topThe top boundary of the selection box in pixel coordinates.

◆ SelectBoxFinal

_DMapEvents_SelectBoxFinalEventHandler AxMap.SelectBoxFinal

This event is fired when the user finishes dragging a selection box in the map control. The map property AxMap.SendSelectBoxFinal must be set to True for this event to be fired.

Parameters
leftThe left boundary of the selection box in pixel coordinates.
rightThe right boundary of the selection box in pixel coordinates.
bottomThe bottom boundary of the selection box in pixel coordinates.
topThe top boundary of the selection box in pixel coordinates.

Prior to version 5.0, there was ambiguity as to whether or not this event was fired in all circumstances. In the case of the tkCursorMode.cmZoomIn tool, this event was always fired.
But in the case of the tkCursorMode.cmSelection tool, it was only fired in the case when no shapes were actually 'selected'. If any shapes were 'selected', the AxMap.SelectionChanged event was fired, but the AxMap.SelectBoxFinal was not. As of version 5.0, the AxMap.SelectBoxFinal event will always be fired after dragging a rectangle, whether or not any shapes were actually 'selected'.

New API 5.0:
Modified in version 5.0

◆ SelectionChanged

_DMapEvents_SelectionChangedEventHandler AxMap.SelectionChanged

This event is fired after shapes were selected with tkCursorMode.cmSelection tool.

Parameters
layerHandleHandle of the layer the shapes were selected on.

The event will be fired only when selection is done by AxMap control internally, i.e.

Starting in version 5.2.0, this event is raised when shapes are selected or deselected, and is also raised one final time, with layerHandle = -1, indicating that all selection events are complete. This is particularly useful when multiple layers are 'Selectable', and you want to know when all layers have completed their selection.

New API 5.2:
Updated in version 5.2

◆ ShapeHighlighted

_DMapEvents_ShapeHighlightedEventHandler AxMap.ShapeHighlighted

This event is fired when mouse cursor is being moved by user and the cursor enters or leaves neighborhood of particular shape.

Parameters
layerHandleHandle of the layer the shape belongs to.
shapeIndexIndex of the shape.

The event is fired when:

For tkCursorMode.cmIdentify tool the shape will be automatically highlighted (see AxMap.Identifier for details); For editing cursors vertices of the shape under cursor will be displayed (see ShapeEditor.HighlightVertices property).

Examples
ShowAttributes.cs.

◆ ShapeIdentified

_DMapEvents_ShapeIdentifiedEventHandler AxMap.ShapeIdentified

This event is fired when user click on a shape with tkCursorMode.cmIdentify tool active.

Parameters
layerHandleHandle of the layer.
shapeIndexIndex of the shape.
projXX coordinate of mouse click position in map coordinates.
projYY coordinate of mouse click position in map coordinates

◆ ShapeValidationFailed

_DMapEvents_ShapeValidationFailedEventHandler AxMap.ShapeValidationFailed

This event is fired when shape being created or edited has topological errors and therefore can't be saved to the layer.

Parameters
errorMessageMessage about the reasons as to why the validation has failed.

◆ SnapPointFound

_DMapEvents_SnapPointFoundEventHandler AxMap.SnapPointFound

This event is fired after a snap point was found either by the default snapping algorithm of MapWinGIS or by a SnapPointRequested handler. Setting the snappedX and snappedY allows you to override this result (use with care!).

Parameters
pointXthe X coordinate of the point a snap point is requested for
pointYthe Y coordinate of the point a snap point is requested for
snappedXthe X coordinate of the snap point found so far (can be changed)
snappedYthe Y coordinate of the snap point found so far (can be changed)
New API 5.2:
Added in version 5.2

◆ SnapPointRequested

_DMapEvents_SnapPointRequestedEventHandler AxMap.SnapPointRequested

This event is fired whenever a snap point is requested by the map before the MapWinGIS snap algorithm was run. If the isFinal flag is set to true, the default snapping algorithm of MapWinGIS will be skipped.

Parameters
pointXthe X coordinate of the point a snap point is requested for
pointYthe Y coordinate of the point a snap point is requested for
snappedXthe X coordinate of the snap point found so far (can be changed)
snappedYthe Y coordinate of the snap point found so far (can be changed)
isFounda flag indicating if a snap point has been found (can be changed)
isFinala flag indicating if the found snap point should be considered final
New API 5.2:
Added in version 5.2

◆ TilesLoaded

_DMapEvents_TilesLoadedEventHandler AxMap.TilesLoaded

This event is fired when complete set of tiles has been loaded for the new map extents.

Parameters
snapshotTrue in case the loading of tiles was done as a part of making snapshot of the map.
keyA key of operation set in AxMap.LoadTilesForSnapshot method.

◆ UndoListChanged

EventHandler AxMap.UndoListChanged

This event is fired when an operations is added or removed from undo/redo list of interactive ShapeEditor.

◆ ValidateShape

_DMapEvents_ValidateShapeEventHandler AxMap.ValidateShape

This event is fired before a shape which is being created or edited is about to be saved back to the layer.

Parameters
layerHandleHandle of the layer.
shapeShape to be validated.
cancelPassed by reference. This value should be set to tkMwBoolean.blnTrue in case shape don't pass custom validation.

ShapeEditor performs its own validation determined by ShapeEditor.ValidationMode, so there is no need to run the same checks once again here (like Shape.IsValid). However if some form of custom rules should be enforced, this is the right place to do it.