Basic Setup
Add a zoom control to your map:Showing the Home Button
Enable the home button to allow users to reset the map view:Zoom Settings
Configure zoom behavior on the MapChart:Zoom Levels
zoomLevel- Current zoom level (default: 1)minZoomLevel- Lowest allowed zoom (default: 1)maxZoomLevel- Highest allowed zoom (default: 32)zoomStep- Zoom factor when using controls (default: 2)
Home Position
Define the initial position the home button returns to:homeZoomLevel- Zoom level to return tohomeGeoPoint- Geographic center pointhomeRotationX- X rotation for home positionhomeRotationY- Y rotation for home position
Programmatic Zoom Control
Zoom In/Out
Control zoom programmatically:Zoom to Point
Zoom to a specific screen point:Zoom to Geographic Point
Zoom to specific coordinates:Zoom to Geographic Bounds
Zoom to fit a specific geographic area:Zoom to Data Item
Zoom to a specific polygon:Pan and Zoom Behavior
Pan Settings
Configure how dragging affects the map:"none"- Disable panning"translateX"/"translateY"- Move the map (flat projections)"rotateX"/"rotateY"- Rotate the globe (spherical projections)
Wheel Behavior
Configure mouse wheel actions:"none"- Ignore wheel"zoom"- Zoom in/out"rotateX"/"rotateY"- Rotate the map
Pinch Zoom
Enable touch-based pinch zooming:Max Pan Out
Control how far the map can be panned outside the viewport:Center on Zoom Out
Automatically center the map when fully zoomed out:Animation Settings
Control zoom and pan animations:animationDuration- Duration in millisecondsanimationEasing- Easing function for smooth animations
Rotation Controls
For spherical projections like Orthographic:Click to Reset
Reset zoom when clicking the map background:Zoom Events
Listen to zoom level changes:Styling the Control
Customize the zoom control appearance:Disabling Zoom Control Buttons
The zoom control automatically disables buttons when limits are reached:Complete Example
Related Topics
- MapChart - Main map chart component
- Projections - Map projection types
- Series Types - Different data visualizations