Skip to content

Commit 4bd5113

Browse files
authored
feat: add RasterSource (#38)
* feature: add RasterLayer and RasterSource * - [WIP] RasterTileSourceExample * - add SetSourceProperty
1 parent 17d117c commit 4bd5113

15 files changed

+958
-187
lines changed

src/libs/Mapbox.Maui/IMapboxView.cs

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ void CameraForCoordinates(
101101
double? maxZoom = default,
102102
ScreenPosition? offset = default
103103
);
104+
void SetSourcePropertyFor<T>(string sourceId, string propertyName, T value, Action<Exception> completion = default);
104105
}
105106

106107
public class MapTappedEventArgs : EventArgs

src/libs/Mapbox.Maui/Mapbox.Maui.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<RepositoryUrl>https://github.com/tuyen-vuduc/mapbox-maui</RepositoryUrl>
6262
<PackageProjectUrl>https://mapbox.tuyen-vuduc.tech</PackageProjectUrl>
6363
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
64-
<PackageVersion>11.5.1-alpha05</PackageVersion>
64+
<PackageVersion>11.5.1-alpha06</PackageVersion>
6565
<PackageReadmeFile>README.md</PackageReadmeFile>
6666
<PackageLicenseFile>LICENSE</PackageLicenseFile>
6767
<PackageIcon>tv-mapbox.png</PackageIcon>
@@ -90,7 +90,7 @@
9090
<PackageReference Include="Xamarin.AndroidX.Annotation" Version="1.8.0.1" />
9191
</ItemGroup>
9292
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">
93-
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.5.2.6" />
93+
<PackageReference Include="MapboxMapsObjC.iOS" Version="11.5.2.7" />
9494
<PackageReference Include="MapboxMaps.iOS" Version="11.5.2" />
9595
</ItemGroup>
9696
<ItemGroup>

src/libs/Mapbox.Maui/Models/Styles/Layers/LayerType.cs

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ namespace MapboxMaui;
2727
/// Raster map textures such as satellite imagery.
2828
public static readonly LayerType Raster = new ("raster");
2929

30+
/// Layer repsenting particles on the map.
31+
public static readonly LayerType RasterParticle = new ("raster-particle");
32+
3033
/// Client-side hillshading visualization based on DEM data.
3134
/// Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.
3235
public static readonly LayerType Hillshade = new ("hillshade");

src/libs/Mapbox.Maui/Models/Styles/Layers/MapboxLayer.cs

+8
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public static class MapboxLayerKey
2323
public const string filter = "filter";
2424
public const string source = "source";
2525
public const string sourceLayer = "source-layer";
26+
public const string slot = "slot";
2627
public const string minZoom = "minzoom";
2728
public const string maxZoom = "maxzoom";
2829
public const string layout = "layout";
@@ -91,6 +92,13 @@ public string SourceLayer
9192
set => SetProperty(MapboxLayerKey.sourceLayer, value);
9293
}
9394

95+
// /// 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.
96+
public string Slot
97+
{
98+
get => GetProperty<string>(MapboxLayerKey.slot, default);
99+
set => SetProperty(MapboxLayerKey.slot, value);
100+
}
101+
94102
public double? MinZoom
95103
{
96104
get => GetProperty<double?>(MapboxLayerKey.minZoom, default);

0 commit comments

Comments
 (0)