A dedicated library and starting sample for integrating Mapbox into your MAUI application.
Install-Package Mapbox.Maui --version 11.1.0-alpha01
Please check out my step-by-step blog post for more details.
- Visual Studio for Mac or Visual Studio for Windows
- .NET 7.0.306
- .NET workloads for iOS, Android, MAUI
-
1/ Generate/grab
MAPBOX_DOWNLOADS_TOKEN
from your Mapbox account page -
2/ Android: Put it into your local
~/.gradle/gradle.properties
echo "MAPBOX_DOWNLOADS_TOKEN=YOUR_MAPBOX_DOWNLOADS_TOKEN" >> ~/.gradle/gradle.properties
- 3/ Make a copy of
MapboxMauiQs.props.template
- Name it
MapboxMauiQs.props
- Replace
YOUR_MAPBOX_DOWNLOADS_TOKEN
with yours inMapboxMauiQs.props
file
- Name it
- 4/ Grab
mapbox_access_token
from your Mapbox account page- Make a copy of
MauiProgram.dev.cs.template
- Name it
MauiProgram.dev.cs
- Replace
YOUR_MAPBOX_ACCESS_TOKEN
with yours inMauiProgram.dev.cs
file
- Make a copy of
- 5/ Run the solution
NOTE: A handy command to generate a new example
dotnet cake -- --name SymbolClustering --index 58 --group Annotations --title "Add Cluster Symbol Annotations" --subtitle "Show fire hydrants in Washington DC area in a cluster using a symbol layer."
- Failed to delete
.gradle
folder Due to Java process not killed gratefully.
taskkill -F -im java.exe
- Xamarin.Build.Download Xamarin.Build.Download is a tool to help download artifacts from remote URL to avoid embedding the native artifacts within the NuGet package with advantages
- Very thin and lightweight NuGet package
- Avoid any license viloation if the owner of the native lib doesn't want us to redistribute their lib
The downloaded artifact will be located at
- MacOS:
~/Library/Caches/XamarinBuildDownload
- Windows:
%USERPROFILE%/AppData/Local/XamarinBuildDownloadCache
- Kill all .NET processes
taskkill -F -im dotnet.exe
This project is maintained by tuyen-vuduc in his spare time and/or when requested.
If you find this project is helpful and benefit your work/business, please give it a star, become a sponsor of the project and/or buy him a coffee.
This library is release under The BSD 3-Clause License. You are freely to use and make changes. However, this license doesn't override the license from Mapbox.