Events
Map events
Map modules

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.
_DMapEvents_AfterShapeEditEventHandler AxMap.AfterShapeEdit
 This event is fired after interactive editing of shape is finished (AxMap.CursorMode is set to cmEditShape).
_DMapEvents_BackgroundLoadingFinishedEventHandler AxMap.BackgroundLoadingFinished
 This event is fired when background loading of data for OgrLayer.Finishes.
_DMapEvents_BackgroundLoadingStartedEventHandler AxMap.BackgroundLoadingStarted
 This event is fired when background loading of data for OgrLayer starts.
_DMapEvents_BeforeDeleteShapeEventHandler AxMap.BeforeDeleteShape
 This event is fired before shape is deleted in interactive Shape Editor.
_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.
_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 cmEditShape).
_DMapEvents_ChooseLayerEventHandler AxMap.ChooseLayer
 The event is fired when current map tool asks for the layer to work with.
EventHandler AxMap.DblClick
 The event is fired when user performs double click with left mouse button while cursor is within the map control.
EventHandler AxMap.ExtentsChanged
 This event is fired when the extents of the map change.
_DMapEvents_FileDroppedEventHandler AxMap.FileDropped
 This event is fired when a user drags a file and drops it on the map.
_DMapEvents_GridOpenedEventHandler AxMap.GridOpened
 This event is fired after grid datasource was added to the map.
_DMapEvents_LayerAddedEventHandler AxMap.LayerAdded
 This event is fired when a new layer has been added to the map.
_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.
_DMapEvents_LayerRemovedEventHandler AxMap.LayerRemoved
 This event is fired when a layer has been removed from map.
_DMapEvents_LayerReprojectedEventHandler AxMap.LayerReprojected
 This event is fired after a layer was reprojected (its original projection was different from the map projection).
_DMapEvents_MapStateEventHandler AxMap.MapStateEvent
 This event is fired for each layer in the map when the map state is changed.
_DMapEvents_MeasuringChangedEventHandler AxMap.MeasuringChanged
 This event is fired after the user adds or removes a point from the path of measuring tool.
_DMapEvents_MouseDownEventHandler AxMap.MouseDownEvent
 This event is fired when a user has pressed a mouse button while the cursor is inside the map control. The map property SendMouseDown must be set to True for this event to be fired.
_DMapEvents_MouseMoveEventHandler AxMap.MouseMoveEvent
 This event is fired when the mouse is moved while the cursor is inside the map control. The map property SendMoveMouse must be set to True for this event to be fired.
_DMapEvents_MouseUpEventHandler AxMap.MouseUpEvent
 This event is fired when the mouse button is released while the cursor is in the map control. The map property SendMouseUp must be set to True for this event to be fired.
_DMapEvents_OnDrawBackBufferEventHandler AxMap.OnDrawBackBuffer
 This event is fired during the rendering of map after data layers and drawing layers were rendered. The map property SendMouseUp SendOnDrawBackBuffer must be set to True for this event to be fired.
EventHandler AxMap.ProjectionChanged
 The event is fired when projection of the map control was changed.
_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.
_DMapEvents_SelectBoxDragEventHandler AxMap.SelectBoxDrag
 This event is fired while the user is dragging a selection box in the map control. The map property SendSelectBoxDrag must be set to True for this event to be fired.
_DMapEvents_SelectBoxFinalEventHandler AxMap.SelectBoxFinal
 This event is fired when the user finishes dragging a selection box in the map control. The map property SendSelectBoxFinal must be set to True for this event to be fired.
_DMapEvents_SelectionChangedEventHandler AxMap.SelectionChanged
 This event is fired after shapes were selected with cmSelection tool.
_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.
_DMapEvents_ShapeIdentifiedEventHandler AxMap.ShapeIdentified
 This event is fired when user click on a shape with cmIdentify tool active.
_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.
_DMapEvents_TilesLoadedEventHandler AxMap.TilesLoaded
 This event is fired when complete set of tiles has been loaded for the new map extents.
EventHandler AxMap.UndoListChanged
 This event is fired when an operations is added or removed from undo/redo list of interactive Shape Editor.
_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.

Detailed Description

dot_inline_dotgraph_12.png

Graph description


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.

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 blnTrue in case some additional drawing is performed in client code.
_DMapEvents_AfterShapeEditEventHandler AxMap.AfterShapeEdit

This event is fired after interactive editing of shape is finished (AxMap.CursorMode is set to 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: uoAddShape, uoRemoveShape, uoEditShape.

_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.
_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 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.

_DMapEvents_BeforeDeleteShapeEventHandler AxMap.BeforeDeleteShape

This event is fired before shape is deleted in interactive Shape Editor.

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 blnTrue.

This event is fired when shape (or some of its elements) is selected in Shape Editor (AxMap.CursorMode = 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.

_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 blnTrue in case some additional drawing is performed in client code.
_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 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 blnTrue.
_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.

LayerHadle 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.

EventHandler AxMap.DblClick

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

EventHandler AxMap.ExtentsChanged

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

_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.
_DMapEvents_GridOpenedEventHandler AxMap.GridOpened

This event is fired after grid datasource was added to the map.

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.
_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.
_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 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.

_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.
_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 peformed successfully. False

Automatic reprojection if peformed 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 GlobalSettings.AllowProjectionMismatch, GlobalSettings.ReprojectionLayerOnAdding properties.

_DMapEvents_MapStateEventHandler AxMap.MapStateEvent

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

Parameters:
layerHandleHandle of the layer.
_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 performed by user.
_DMapEvents_MouseDownEventHandler AxMap.MouseDownEvent

This event is fired when a user has pressed a mouse button while the cursor is inside the map control. The map property 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 control's origin.
yY coordinate of mouse cursor position in pixels relative to control's origin.
_DMapEvents_MouseMoveEventHandler AxMap.MouseMoveEvent

This event is fired when the mouse is moved while the cursor is inside the map control. The map property SendMoveMouse 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 control's origin.
yY coordinate of mouse cursor position in pixels relative to control's origin.
_DMapEvents_MouseUpEventHandler AxMap.MouseUpEvent

This event is fired when the mouse button is released while the cursor is in the map control. The map property 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 control's origin.
yY coordinate of mouse cursor position in pixels relative to control's origin.
_DMapEvents_OnDrawBackBufferEventHandler AxMap.OnDrawBackBuffer

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

Parameters:
BackBufferHandle of the device context of back buffer bitmap.

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

_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 blnTrue in case the adding of the layer should be cancelled.
reprojectPassed by reference. The value should be set to blnTrue to instruct the control to run automatic reprojection of the layer.
_DMapEvents_SelectBoxDragEventHandler AxMap.SelectBoxDrag

This event is fired while the user is dragging a selection box in the map control. The map property 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.
_DMapEvents_SelectBoxFinalEventHandler AxMap.SelectBoxFinal

This event is fired when the user finishes dragging a selection box in the map control. The map property 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.
_DMapEvents_SelectionChangedEventHandler AxMap.SelectionChanged

This event is fired after shapes were selected with 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.

  • AxMap.CursorMode set to cmSelection;
  • a layer handle is passed to AxMap.ChooseLayer event handler;
  • user changes selection by clicking on shapes or drawing selection box. When Shapefile.ShapeSelected property is changed from client code no event is fired.
_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 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.
_DMapEvents_ShapeIdentifiedEventHandler AxMap.ShapeIdentified

This event is fired when user click on a shape with 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
_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.
_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.
EventHandler AxMap.UndoListChanged

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

_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 blnTrue in case shape don't pass custom validation.

Shape Editor 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 is some form of custom rules should be enforced, there is a right place to do it.

 All Classes Files Functions Enumerations Properties Events