TdxCustomMapControl.ZoomLevel Property
Specifies the map zoom level.
#Declaration
property ZoomLevel: Double read; write;
#Property Value
Type | Description |
---|---|
Double | The current map zoom level. The property value ranges between |
#Remarks
Use the ZoomLevel
property to zoom the displayed map in or out. Alternatively, you can call the Zoom or ZoomAsync procedure.
Tip
The Zoom procedure is executed in the main thread and, therefore, locks the application UI until the Map Control loads all map tiles that correspond to the target zoom level.
If you use external UI elements to change the map zoom level, we recommend that you call the Zoom
#Map Zoom Increment/Decrement Operations
ZoomIn/ZoomOut procedures correspond to zoom increment/decrement buttons on the Navigation Panel:
#End-User Zoom Functionality
Users can do the following to zoom the displayed map in or out if the OptionsBehavior.Zooming property is set to True
(default):
- Click and drag the zoom thumb, click any position on the zoom track, or click increment and decrement buttons if the
ShowZoomTrackBar
property is set toTrue
(default). - Hold Shift and Ctrl keys and drag the mouse pointer to use marquee zoom.
- Press + and - keys.
- Rotate the mouse wheel.
#Zoom Change Animations
The Map Control plays map zoom change animations if the OptionsBehavior.Animation property is set to True
(default).
The ZoomLevel
property always specifies the target zoom level value. You can use the ActualZoomLevel property to identify the current zoom level during a zoom change animation.
Note
The Zoom procedure allows you to override the current Options
#Related Events
The following events occur every time the ZoomLevel
property value changes:
- OnZoomLevelChanged
- Allows you to execute custom code in response to map zoom changes.
- OnZoomLevelChanging
- Allows you to prevent certain map zoom in or out operations depending on specific conditions in your application.
#Default Value
The ZoomLevel
property’s default value is 1
.