diff --git a/src/libs/Mapbox.Maui/Mapbox.Maui.csproj b/src/libs/Mapbox.Maui/Mapbox.Maui.csproj
index f6a3baa..5f3a467 100644
--- a/src/libs/Mapbox.Maui/Mapbox.Maui.csproj
+++ b/src/libs/Mapbox.Maui/Mapbox.Maui.csproj
@@ -61,7 +61,7 @@
https://github.com/tuyen-vuduc/mapbox-maui
https://mapbox.tuyen-vuduc.tech
false
- 11.5.0-alpha02
+ 11.5.0-alpha03
README.md
LICENSE
tv-mapbox.png
diff --git a/src/libs/Mapbox.Maui/Platforms/Android/MapboxFragment.cs b/src/libs/Mapbox.Maui/Platforms/Android/MapboxFragment.cs
index 0b72a3e..71c40c8 100644
--- a/src/libs/Mapbox.Maui/Platforms/Android/MapboxFragment.cs
+++ b/src/libs/Mapbox.Maui/Platforms/Android/MapboxFragment.cs
@@ -164,11 +164,13 @@ partial class MapboxFragment
{
void ICameraChangedCallback.Run(CameraChanged p0)
{
+ var center = p0.CameraState.Center.ToMapPosition();
+ var padding = p0.CameraState.Padding.ToX();
var cameraOptions = new CameraOptions
{
- Center = p0.CameraState.Center.ToMapPosition(),
+ Center = center,
Bearing = (float)p0.CameraState.Bearing,
- Padding = (float)p0.CameraState.Padding,
+ Padding = padding,
Pitch = (float)p0.CameraState.Pitch,
Zoom = (float)p0.CameraState.Zoom,
};
diff --git a/src/qs/MapboxMauiQs/Examples/Camera/65.CameraAnimations/CameraAnimationsExample.cs b/src/qs/MapboxMauiQs/Examples/Camera/65.CameraAnimations/CameraAnimationsExample.cs
index 5ea8d1b..55ea9bf 100644
--- a/src/qs/MapboxMauiQs/Examples/Camera/65.CameraAnimations/CameraAnimationsExample.cs
+++ b/src/qs/MapboxMauiQs/Examples/Camera/65.CameraAnimations/CameraAnimationsExample.cs
@@ -42,10 +42,15 @@ public CameraAnimationsExample()
map.MapReady += Map_MapReady;
map.StyleLoaded += Map_StyleLoaded;
map.MapLoaded += Map_MapLoaded;
+ map.CameraChanged += Map_CameraChanged;
Content = grid;
}
+ private void Map_CameraChanged(object sender, CameraChangedEventArgs e)
+ {
+ }
+
private void HandleCameraFlyTo(object sender, EventArgs e)
{
var centerLocation = new MapPosition(21.028511, 105.804817);
diff --git a/src/qs/MapboxMauiQs/Examples/Camera/69.AdvancedViewportGestures/AdvancedViewportGesturesExample.cs b/src/qs/MapboxMauiQs/Examples/Camera/69.AdvancedViewportGestures/AdvancedViewportGesturesExample.cs
index 0a59361..f2db647 100644
--- a/src/qs/MapboxMauiQs/Examples/Camera/69.AdvancedViewportGestures/AdvancedViewportGesturesExample.cs
+++ b/src/qs/MapboxMauiQs/Examples/Camera/69.AdvancedViewportGestures/AdvancedViewportGesturesExample.cs
@@ -1,5 +1,4 @@
-using System.Text.Json.Nodes;
-using Android.Gestures;
+using MapboxMaui.Gestures;
using MapboxMaui.Viewport;
namespace MapboxMauiQs;
@@ -121,11 +120,11 @@ private void SetupAdvancedGesturesForFollowPuckViewportState()
//map.GestureShoved += HandleGestureShoved;
}
- private void HandleRotatingBegan(object sender, Gestures.RotatingBeganEventArgs e)
+ private void HandleRotatingBegan(object sender, RotatingBeganEventArgs e)
{
followPuckViewportState.Options.Bearing = null;
}
- private void HandleRotatingEnded(object sender, Gestures.RotatingEndedEventArgs e)
+ private void HandleRotatingEnded(object sender, RotatingEndedEventArgs e)
{
followPuckViewportState.Options.Bearing = map.CameraController.CameraState.Bearing;
}