vcl-dxmapcontrol-dot-tdxcustommapcontrol-39073c38.md
Specifies the map zoom level.
property ZoomLevel: Double read; write;
| Type | Description |
|---|---|
| Double |
The current map zoom level.
The property value ranges between 1.0 (zoomed out) and 20.0 (zoomed in).
|
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 ZoomAsync procedure to keep your application UI responsive.
ZoomIn/ZoomOut procedures correspond to zoom increment/decrement buttons on the Navigation Panel :
Users can do the following to zoom the displayed map in or out if the OptionsBehavior.Zooming property is set to True ( default ):
ShowZoomTrackBar property is set to True ( default ).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 OptionsBehavior.Animation setting for an individual zoom in or out operation.
The following events occur every time the ZoomLevel property value changes:
OnZoomLevelChangedAllows you to execute custom code in response to map zoom changes.OnZoomLevelChangingAllows you to prevent certain map zoom in or out operations depending on specific conditions in your application.
The ZoomLevel property’s default value is 1.
See Also
TdxCustomMapControl.ZoomToFitItems Procedure
TdxCustomMapControl.ZoomToFitLayerItems Procedure