Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxCustomMapControl.ZoomLevel Property

Specifies the map zoom level.

#Declaration

Delphi
property ZoomLevel: Double read; write;

#Property Value

Type Description
Double

The current map zoom level.

The property value ranges between 1.0 (zoomed out) and 20.0 (zoomed in).

#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 ZoomAsync procedure to keep your application UI responsive.

#Map Zoom Increment/Decrement Operations

ZoomIn/ZoomOut procedures correspond to zoom increment/decrement buttons on the Navigation Panel:

VCL Map Control: Zoom Track Bar Elements

#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 to True (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 OptionsBehavior.Animation setting for an individual zoom in or out operation.

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.

See Also