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: add RasterSource #38

Merged
merged 3 commits into from
Aug 26, 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
1 change: 1 addition & 0 deletions src/libs/Mapbox.Maui/IMapboxView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ void CameraForCoordinates(
double? maxZoom = default,
ScreenPosition? offset = default
);
void SetSourcePropertyFor<T>(string sourceId, string propertyName, T value, Action<Exception> completion = default);
}

public class MapTappedEventArgs : EventArgs
Expand Down
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 @@ -61,7 +61,7 @@
<RepositoryUrl>https://github.com/tuyen-vuduc/mapbox-maui</RepositoryUrl>
<PackageProjectUrl>https://mapbox.tuyen-vuduc.tech</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageVersion>11.5.1-alpha05</PackageVersion>
<PackageVersion>11.5.1-alpha06</PackageVersion>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>tv-mapbox.png</PackageIcon>
Expand Down Expand Up @@ -90,7 +90,7 @@
<PackageReference Include="Xamarin.AndroidX.Annotation" Version="1.8.0.1" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.5.2.6" />
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.5.2.7" />
<PackageReference Include="MapboxMaps.iOS" Version="11.5.2" />
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/libs/Mapbox.Maui/Models/Styles/Layers/LayerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ namespace MapboxMaui;
/// Raster map textures such as satellite imagery.
public static readonly LayerType Raster = new ("raster");

/// Layer repsenting particles on the map.
public static readonly LayerType RasterParticle = new ("raster-particle");

/// Client-side hillshading visualization based on DEM data.
/// Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.
public static readonly LayerType Hillshade = new ("hillshade");
Expand Down
8 changes: 8 additions & 0 deletions src/libs/Mapbox.Maui/Models/Styles/Layers/MapboxLayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public static class MapboxLayerKey
public const string filter = "filter";
public const string source = "source";
public const string sourceLayer = "source-layer";
public const string slot = "slot";
public const string minZoom = "minzoom";
public const string maxZoom = "maxzoom";
public const string layout = "layout";
Expand Down Expand Up @@ -91,6 +92,13 @@ public string SourceLayer
set => SetProperty(MapboxLayerKey.sourceLayer, value);
}

// /// The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
public string Slot
{
get => GetProperty<string>(MapboxLayerKey.slot, default);
set => SetProperty(MapboxLayerKey.slot, value);
}

public double? MinZoom
{
get => GetProperty<double?>(MapboxLayerKey.minZoom, default);
Expand Down
Loading