Skip to content

Commit

Permalink
- 11.4.0-alpha02
Browse files Browse the repository at this point in the history
  • Loading branch information
tuyen-vuduc committed Jul 9, 2024
1 parent 9a044b5 commit d03cc52
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/libs/Mapbox.Maui/Mapbox.Maui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<RepositoryUrl>https://github.com/tuyen-vuduc/mapbox-maui</RepositoryUrl>
<PackageProjectUrl>https://mapbox.tuyen-vuduc.tech</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageVersion>11.4.0-alpha01</PackageVersion>
<PackageVersion>11.4.0-alpha02</PackageVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tv-mapbox.png</PackageIcon>
Expand All @@ -80,7 +80,7 @@
<PackageReference Include="Xamarin.Kotlin.StdLib.Common" Version="1.9.23.3" PrivateAssets="none" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.4.0.1" />
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.4.0.2" />
<PackageReference Include="MapboxMaps.iOS" Version="11.4.0.1" />
</ItemGroup>
<ItemGroup>
Expand Down
35 changes: 16 additions & 19 deletions src/libs/Mapbox.Maui/Platforms/iOS/MapboxViewHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,22 @@ private static void HandleGestureSettingsChanged(MapboxViewHandler handler, IMap
var mapView = handler.PlatformView.MapView;
if (mapView == null) return;

var gestures = mapView.Gestures().GestureOptions();

gestures.DoubleTapToZoomInEnabled = view.GestureSettings.DoubleTapToZoomInEnabled;
gestures.DoubleTouchToZoomOutEnabled = view.GestureSettings.DoubleTouchToZoomOutEnabled;
gestures.FocalPoint = view.GestureSettings.FocalPoint?.ToNSValue();
//gestures.IncreasePinchToZoomThresholdWhenRotating = view.GestureSettings.IncreasePinchToZoomThresholdWhenRotating;
//gestures.IncreaseRotateThresholdWhenPinchingToZoom = view.GestureSettings.IncreaseRotateThresholdWhenPinchingToZoom;
gestures.PanEnabled = view.GestureSettings.PinchToZoomEnabled;
//gestures.PinchToZoomDecelerationEnabled = view.GestureSettings.PinchToZoomDecelerationEnabled;
gestures.PinchZoomEnabled = view.GestureSettings.PinchToZoomEnabled;
gestures.PitchEnabled = view.GestureSettings.PitchEnabled;
gestures.QuickZoomEnabled = view.GestureSettings.QuickZoomEnabled;
//gestures.RotateDecelerationEnabled = view.GestureSettings.RotateDecelerationEnabled;
gestures.RotateEnabled = view.GestureSettings.RotateEnabled;
//gestures.ScrollDecelerationEnabled = view.GestureSettings.ScrollDecelerationEnabled;
//gestures.ScrollEnabled = view.GestureSettings.ScrollEnabled;
gestures.PanMode = view.GestureSettings.ScrollMode.ToNative();
gestures.SimultaneousRotateAndPinchZoomEnabled = view.GestureSettings.SimultaneousRotateAndPinchToZoomEnabled;
gestures.PanDecelerationFactor = view.GestureSettings.PanDecelerationFactor;
var gestureOptions = new TMBGestureOptions(
panEnabled: view.GestureSettings.PinchScrollEnabled,
pinchEnabled: false,
rotateEnabled: view.GestureSettings.RotateEnabled,
simultaneousRotateAndPinchZoomEnabled: view.GestureSettings.SimultaneousRotateAndPinchToZoomEnabled,
pinchZoomEnabled: view.GestureSettings.PinchToZoomEnabled,
pinchPanEnabled: false,
pitchEnabled: view.GestureSettings.PitchEnabled,
doubleTapToZoomInEnabled: view.GestureSettings.DoubleTapToZoomInEnabled,
doubleTouchToZoomOutEnabled: view.GestureSettings.DoubleTouchToZoomOutEnabled,
quickZoomEnabled: view.GestureSettings.QuickZoomEnabled,
panDecelerationFactor: UIScrollView.DecelerationRateNormal,
panMode: view.GestureSettings.ScrollMode.ToNative(),
focalPoint: view.GestureSettings.FocalPoint?.ToNSValue()
);
mapView.Gestures().GestureOptions = gestureOptions;
}

private static void HandleLightChanged(MapboxViewHandler handler, IMapboxView view)
Expand Down
2 changes: 1 addition & 1 deletion src/qs/MapboxMauiQs/MapboxMauiQs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
</Compile>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.4.0.1" />
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.4.0.2" />
<PackageReference Include="MapboxMaps.iOS" Version="11.4.0.1" />

<Compile Include="..\..\libs\Mapbox.Maui\Platforms\iOS\**\**\*.cs">
Expand Down

0 comments on commit d03cc52

Please sign in to comment.