Overview
The Open Mobile Maps SDK supports advanced 3D globe rendering capabilities, allowing you to display maps on a spherical surface with realistic perspective and camera controls. This is ideal for global visualizations, flight tracking, and immersive map experiences.The 3D camera system uses
MapCamera3dInterface which extends the standard MapCameraInterface with additional 3D-specific features.Enabling 3D Mode
To create a map with 3D capabilities, initialize the camera with theis3D parameter set to true:
Camera3dConfig
TheCamera3dConfig struct controls the behavior and appearance of the 3D camera. It includes the following properties:
Unique identifier for this camera configuration
Whether the user can interact with the camera through gestures
Automatic rotation speed in degrees per second (optional)
Duration in milliseconds for camera transition animations
Minimum allowed zoom level
Maximum allowed zoom level
Defines how camera pitch changes with zoom level
Vertical camera displacement in the viewport, ranging from -1.0 to 1.0
Camera Interpolation
TheCameraInterpolation struct allows you to define how camera properties change based on zoom level:
Example: Pitch Interpolation
Preset Configurations
The SDK provides factory methods for common 3D configurations:Setting Camera Configuration
Apply a camera configuration with optional animation:3D Helper Functions
TheMapCamera3DHelper class provides utility functions for 3D calculations:
Field of View
The 3D camera uses a perspective projection with configurable field of view. The camera automatically calculates horizontal and vertical FOV based on the viewport aspect ratio.The SDK uses a right-handed coordinate system where the globe is represented as a unit sphere.
Best Practices
Optimize pitch for use case
Optimize pitch for use case
For navigation apps, use lower pitch angles (0-30°) to maintain top-down view. For exploration apps, higher pitch angles (30-60°) provide more immersive perspective.
Set appropriate zoom limits
Set appropriate zoom limits
Prevent users from zooming too far out (where the globe appears too small) or too far in (where 3D perspective becomes less useful) by setting sensible
minZoom and maxZoom values.Use smooth transitions
Use smooth transitions
When changing camera configurations, always specify an
animationDurationMs to provide smooth visual transitions between states.Next Steps
Camera Controls
Learn about camera movement, bounds, and gestures
Animations
Animate camera transitions and layer properties