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... | |
_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.
hdc | Handle of device context of screen buffer. |
xMin | Minimum X coordinate of the rectangle being rendered. |
xMax | Maximum X coordinate of the rectangle being rendered. |
yMin | Minimum Y coordinate of the rectangle being rendered. |
yMax | Maximum Y coordinate of the rectangle being rendered. |
handled | Passed by reference. The value should be set to tkMwBoolean.blnTrue in case some additional drawing is performed in client code. |
_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.
hdc | Handle of device context of screen buffer. |
xMin | Minimum X coordinate of the rectangle being rendered. |
xMax | Maximum X coordinate of the rectangle being rendered. |
yMin | Minimum Y coordinate of the rectangle being rendered. |
yMax | Maximum Y coordinate of the rectangle being rendered. |
handled | Passed by reference. The value should be set to tkMwBoolean.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 tkCursorMode.cmEditShape).
operation | The type of editing operation that was performed. |
layerHandle | Handle of the layer the shape being edited belongs to. |
shapeIndex | Index 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.
_DMapEvents_BackgroundLoadingFinishedEventHandler AxMap.BackgroundLoadingFinished |
This event is fired when background loading of data for OgrLayer finishes.
taskId | Unique Id of the loading task. |
layerHandle | Handle of the layer the loading is peformed for. |
numFeatures | Number of features within current map extents. |
numLoaded | Number of features that were actually loaded. |
The loading task may be finished without any features being loaded under the following circumstances:
_DMapEvents_BackgroundLoadingStartedEventHandler AxMap.BackgroundLoadingStarted |
This event is fired when background loading of data for OgrLayer starts.
taskId | Unique Id of the loading task, which can be tracked down in AxMap.BackgroundLoadingFinished to determine the results of the operation. |
layerHandle | Handle 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 ShapeEditor.
target | What element of shape (whole shape, part, single vertex) is to be deleted. |
cancel | Passed 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.
_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.
hdc | Handle of device context of screen buffer. |
xMin | Minimum X coordinate of the rectangle being rendered. |
xMax | Maximum X coordinate of the rectangle being rendered. |
yMin | Minimum Y coordinate of the rectangle being rendered. |
yMax | Maximum Y coordinate of the rectangle being rendered. |
handled | Passed by reference. The value should be set to tkMwBoolean.blnTrue in case some additional drawing is performed in client code. |
_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.
hdc | Handle of device context of screen buffer. |
xMin | Minimum X coordinate of the rectangle being rendered. |
xMax | Maximum X coordinate of the rectangle being rendered. |
yMin | Minimum Y coordinate of the rectangle being rendered. |
yMax | Maximum Y coordinate of the rectangle being rendered. |
handled | Passed by reference. The value should be set to tkMwBoolean.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 tkCursorMode.cmEditShape).
layerHandle | Handle of the layer the shape was selected from. |
shapeIndex | Index of shape to be edited. |
cancel | Passed by reference. Allows user to cancel the editing operations by setting the value to tkMwBoolean.blnTrue. |
_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.
pointX | X coordinate |
pointY | Y coordinate |
_DMapEvents_ChooseLayerEventHandler AxMap.ChooseLayer |
The event is fired when current map tool asks for the layer to work with.
xProj | X coordinate of mouse click in map coordinates (if the event was triggered by mouse click). |
yProj | Y coordinate of mouse click in map coordinates (if the event was triggered by mouse click). |
layerHandle | Passed 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.
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.
filename | The filename of the file dropped on the map. |
_DMapEvents_GridOpenedEventHandler AxMap.GridOpened |
This event is fired after grid datasource was added to the map (AxMap.AddLayer).
layerHandle | Handle of the layer. |
gridFilename | The filename of the original datasource. |
bandIndex | Index of band which is used for visualization. |
isUsingProxy | Whether the datasource is rendered by Image class directly or by using an RBG image that was created to serve as proxy (Grid.CreateImageProxy). |
_DMapEvents_LayerAddedEventHandler AxMap.LayerAdded |
This event is fired when a new layer has been added to the map.
layerHandle | Handle 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.
layerHandle | Handle of the layer. |
cancelAdding | Passed 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.
_DMapEvents_LayerRemovedEventHandler AxMap.LayerRemoved |
This event is fired when a layer has been removed from map.
layerHandle | Handle of the layer. |
fromRemoveAllLayers | The 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).
layerHandle | Handle of the layer. |
success | True 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.
_DMapEvents_LayerReprojectedIncompleteEventHandler AxMap.LayerReprojectedIncomplete |
This event is fired when a layer was not fully reprojected. It is controlled by the GlobalSettings.AllowLayersWithIncompleteReprojection property.
layerHandle | |
numReprojected | |
numShapes |
_DMapEvents_MapStateEventHandler AxMap.MapState |
This event is fired for each layer in the map when the map state is changed.
layerHandle | Handle 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.
action | Particular action (like tkMeasuringAction.PointAdded) performed by user. |
_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.
button | Mouse button that was pressed. |
shift | The shift/ctrl modifiers pressed during the creation of this event. |
x | X coordinate of mouse cursor position in pixels relative to controls origin. |
y | Y coordinate of mouse cursor position in pixels relative to controls origin. |
_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.
button | Mouse button that was pressed. |
shift | The shift/ctrl modifiers pressed during the creation of this event. |
x | X coordinate of mouse cursor position in pixels relative to controls origin. |
y | Y coordinate of mouse cursor position in pixels relative to controls origin. |
_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.
button | Mouse button that was pressed. |
shift | The shift/ctrl modifiers pressed during the creation of this event. |
x | X coordinate of mouse cursor position in pixels relative to controls origin. |
y | Y coordinate of mouse cursor position in pixels relative to controls 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 AxMap.SendOnDrawBackBuffer must be set to True for this event to be fired.
backBuffer | Handle of the device context of back buffer bitmap. |
_DMapEvents_OnDrawBackBuffer2EventHandler AxMap.OnDrawBackBuffer2 |
Special version of _DMapEvents.OnDrawBackBuffer
height | |
width | |
stride | |
pixelFormat | |
scan0 |
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.
layerHandle | Handle of the layer. |
cancelAdding | Passed by reference. The value should be set to tkMwBoolean.blnTrue in case the adding of the layer should be cancelled. |
reproject | Passed by reference. The value should be set to tkMwBoolean.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 AxMap.SendSelectBoxDrag must be set to True for this event to be fired.
left | The left boundary of the selection box in pixel coordinates. |
right | The right boundary of the selection box in pixel coordinates. |
bottom | The bottom boundary of the selection box in pixel coordinates. |
top | The 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 AxMap.SendSelectBoxFinal must be set to True for this event to be fired.
left | The left boundary of the selection box in pixel coordinates. |
right | The right boundary of the selection box in pixel coordinates. |
bottom | The bottom boundary of the selection box in pixel coordinates. |
top | The 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'.
_DMapEvents_SelectionChangedEventHandler AxMap.SelectionChanged |
This event is fired after shapes were selected with tkCursorMode.cmSelection tool.
layerHandle | Handle 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.
_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.
layerHandle | Handle of the layer the shape belongs to. |
shapeIndex | Index 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).
_DMapEvents_ShapeIdentifiedEventHandler AxMap.ShapeIdentified |
This event is fired when user click on a shape with tkCursorMode.cmIdentify tool active.
layerHandle | Handle of the layer. |
shapeIndex | Index of the shape. |
projX | X coordinate of mouse click position in map coordinates. |
projY | Y 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.
errorMessage | Message about the reasons as to why the validation has failed. |
_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!).
pointX | the X coordinate of the point a snap point is requested for |
pointY | the Y coordinate of the point a snap point is requested for |
snappedX | the X coordinate of the snap point found so far (can be changed) |
snappedY | the Y coordinate of the snap point found so far (can be changed) |
_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.
pointX | the X coordinate of the point a snap point is requested for |
pointY | the Y coordinate of the point a snap point is requested for |
snappedX | the X coordinate of the snap point found so far (can be changed) |
snappedY | the Y coordinate of the snap point found so far (can be changed) |
isFound | a flag indicating if a snap point has been found (can be changed) |
isFinal | a flag indicating if the found snap point should be considered final |
_DMapEvents_TilesLoadedEventHandler AxMap.TilesLoaded |
This event is fired when complete set of tiles has been loaded for the new map extents.
snapshot | True in case the loading of tiles was done as a part of making snapshot of the map. |
key | A 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 ShapeEditor.
_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.
layerHandle | Handle of the layer. |
shape | Shape to be validated. |
cancel | Passed 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.