Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: v11.4.0-alpha01 #18

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 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.3.0-alpha04</PackageVersion>
<PackageVersion>11.4.0-alpha01</PackageVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tv-mapbox.png</PackageIcon>
Expand All @@ -72,15 +72,16 @@
<PackageReference Include="Microsoft.Maui.Controls" Version="8.0.40" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="Com.Mapbox.Maps.Android" Version="11.3.1.7" />
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.6.1.8" />
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.6.2.3" />
<PackageReference Include="Xamarin.Kotlin.StdLib" Version="1.9.23.1" PrivateAssets="none" />
<PackageReference Include="Xamarin.Kotlin.StdLib.Common" Version="1.9.23.1" PrivateAssets="none" />
<PackageReference Include="Com.Mapbox.Maps.Android" Version="11.4.1" />
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.6.1.10" />
<PackageReference Include="Xamarin.AndroidX.Fragment " Version="1.7.0.2" />
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.7.0.2" />
<PackageReference Include="Xamarin.Kotlin.StdLib" Version="1.9.23.3" PrivateAssets="none" />
<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.3.0.3" />
<PackageReference Include="MapboxMaps.iOS" Version="11.3.0.2" />
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.4.0" />
<PackageReference Include="MapboxMaps.iOS" Version="11.4.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Models\Styles\" />
Expand Down
23 changes: 23 additions & 0 deletions src/libs/Mapbox.Maui/Platforms/iOS/MapboxViewHandler.Camera.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using MapboxMapsObjC;
using UIKit;

namespace MapboxMaui;

Expand All @@ -11,9 +12,20 @@ public void EaseTo(CameraOptions cameraOptions, AnimationOptions animationOption
if (mapView == null) return;

var xcameraOptions = cameraOptions.ToNative();
var curve = animationOptions?.Curve is not null
? animationOptions.Curve switch
{
TimingCurve.EaseIn => UIViewAnimationCurve.EaseIn,
TimingCurve.EaseInOut => UIViewAnimationCurve.EaseInOut,
TimingCurve.EaseOut => UIViewAnimationCurve.EaseOut,
TimingCurve.Linear => UIViewAnimationCurve.Linear,
_ => UIViewAnimationCurve.EaseOut,
}
: UIViewAnimationCurve.EaseOut;
mapView.Camera().FlyTo(
xcameraOptions,
animationOptions?.Duration / 1000L ?? 0,
curve,
(position) =>
{
var xposition = position switch
Expand All @@ -34,9 +46,20 @@ public void FlyTo(CameraOptions cameraOptions, AnimationOptions animationOptions
if (mapView == null) return;

var xcameraOptions = cameraOptions.ToNative();
var curve = animationOptions?.Curve is not null
? animationOptions.Curve switch
{
TimingCurve.EaseIn => UIViewAnimationCurve.EaseIn,
TimingCurve.EaseInOut => UIViewAnimationCurve.EaseInOut,
TimingCurve.EaseOut => UIViewAnimationCurve.EaseOut,
TimingCurve.Linear => UIViewAnimationCurve.Linear,
_ => UIViewAnimationCurve.EaseOut,
}
: UIViewAnimationCurve.EaseOut;
mapView.Camera().FlyTo(
xcameraOptions,
animationOptions?.Duration / 1000L ?? 0,
curve,
(position) =>
{
var xposition = position switch
Expand Down
15 changes: 8 additions & 7 deletions src/qs/MapboxMauiQs/MapboxMauiQs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,20 @@
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">
<PackageReference Include="Com.Mapbox.Maps.Android" Version="11.3.1.7" />
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.6.1.8" />
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.6.2.3" />
<PackageReference Include="Xamarin.Kotlin.StdLib" Version="1.9.23.1" PrivateAssets="none" />
<PackageReference Include="Xamarin.Kotlin.StdLib.Common" Version="1.9.23.1" PrivateAssets="none" />
<PackageReference Include="Com.Mapbox.Maps.Android" Version="11.4.1" />
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.6.1.10" />
<PackageReference Include="Xamarin.AndroidX.Fragment " Version="1.7.0.2" />
<PackageReference Include="Xamarin.AndroidX.Fragment.Ktx" Version="1.7.0.2" />
<PackageReference Include="Xamarin.Kotlin.StdLib" Version="1.9.23.3" PrivateAssets="none" />
<PackageReference Include="Xamarin.Kotlin.StdLib.Common" Version="1.9.23.3" PrivateAssets="none" />

<Compile Include="..\..\libs\Mapbox.Maui\Platforms\Android\**\**\*.cs">
<Link>Platforms\Android\Shared\%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.3.0.3" />
<PackageReference Include="MapboxMaps.iOS" Version="11.3.0.2" />
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.4.0" />
<PackageReference Include="MapboxMaps.iOS" Version="11.4.0" />

<Compile Include="..\..\libs\Mapbox.Maui\Platforms\iOS\**\**\*.cs">
<Link>Platforms\iOS\Shared\%(RecursiveDir)%(Filename)%(Extension)</Link>
Expand Down
Loading