Release v1.10.0
Map Pitch: Bringing Navigation to Life
Navigation apps work best when they mirror how we naturally see the world. That's why v1.10.0 introduces map pitch – the ability to tilt your map view to create a more immersive, perspective-based navigation experience.
Why Map Pitch Matters
When following turn-by-turn directions, a tilted map perspective is significantly more intuitive than a flat, bird's-eye view. By simulating the traveler's forward-looking perspective, your users can:
- Navigate with confidence – The tilted view matches what drivers see on the road ahead
- Anticipate turns earlier – Upcoming intersections and landmarks become more recognizable
- Reduce cognitive load – Less mental translation between the map and the real world
- Create premium experiences – Modern navigation apps from Waze to Google Maps use this technique
Implementation
Setting map pitch is straightforward with the setMapPitch
method in GLMapView
:
iOS:
[mapView setMapPitch:45.0]; // Tilt the map 45 degrees
Android:
mapView.setMapPitch(45.0f); // Tilt the map 45 degrees
The pitch value is specified in degrees, where:
0°
= completely flat (traditional overhead view)45°
= moderate tilt (recommended for most navigation scenarios)60°
= steep perspective (dramatic effect for showcasing routes)
Use Cases
- Turn-by-turn navigation – Automatically tilt when guidance is active
- Route preview – Showcase the journey with a cinematic flyover effect
- 3D landmarks – Highlight buildings and terrain features
- Real estate & tourism apps – Give users a street-level preview
Breaking Changes
GLMapGestureBlock
Type Update
The gesture handler signature has been updated to provide more control:
Before (v1.9.x):
typedef void (^GLMapGestureBlock)(PlatformGestureRecognizer *gestureRecognizer);
After (v1.10.0):
typedef BOOL (^GLMapGestureBlock)(PlatformGestureRecognizer *gestureRecognizer);
What changed:
- The block now returns a BOOL indicating whether the gesture was handled
- Return
YES
if your code handled the gesture - Return
NO
to allow the default map behavior to proceed
Migration example:
// Old code (v1.9.x)
[mapView setOnTapGestureBlock:^(UITapGestureRecognizer *gesture) {
CGPoint point = [gesture locationInView:mapView];
// Handle tap
}];
// New code (v1.10.0)
[mapView setOnTapGestureBlock:^BOOL(UITapGestureRecognizer *gesture) {
CGPoint point = [gesture locationInView:mapView];
// Handle tap
return YES; // Indicate the tap was handled
}];
This change enables better gesture conflict resolution and more predictable behavior when combining custom gestures with built-in map interactions.