Skip to main content

TdxCustomMapControl.ZoomLevel Property

Specifies the zoom level of the map control.

Declaration

property ZoomLevel: Double read; write;

Property Value

Type
Double

Remarks

The property value ranges from 1 (completely zoomed out) to 20 (completely zoomed in). In addition to changing the property value, you can call the Zoom or ZoomAsync method. To granularly adjust the zoom level, call the ZoomIn or ZoomOut method. To zoom the map on specific map items or a geographic rectangle, call the ZoomToFitItems, ZoomToFitLayerItems, or ZoomToGeoRect method.

End-users can zoom in/out of the map as described in the Zooming section.

Changing the zoom level automatically repaints the map with animation if the map control’s OptionsBehavior.Animation property is set to True. While the zoom animation plays, you can determine the current zoom level using the ActualZoomLevel property. The Zoom method allows you to temporarily enable or disable the zoom animation. Refer to the method description to learn more.

Handle the OnZoomLevelChanged and OnZoomLevelChanging events to respond to zoom level changes and prohibit the map control from zooming in/out of the map.

Note

If you are using external controls to change the zoom level, we recommend that you call the ZoomAsync method to keep your application responsive.

The default value of the ZoomLevel property is 1.

See Also