![]() |
VOOZH | about |
dotnet add package Onion.Maui.GoogleMaps.Clustering --version 6.4.0
NuGet\Install-Package Onion.Maui.GoogleMaps.Clustering -Version 6.4.0
<PackageReference Include="Onion.Maui.GoogleMaps.Clustering" Version="6.4.0" />
<PackageVersion Include="Onion.Maui.GoogleMaps.Clustering" Version="6.4.0" />Directory.Packages.props
<PackageReference Include="Onion.Maui.GoogleMaps.Clustering" />Project file
paket add Onion.Maui.GoogleMaps.Clustering --version 6.4.0
#r "nuget: Onion.Maui.GoogleMaps.Clustering, 6.4.0"
#:package Onion.Maui.GoogleMaps.Clustering@6.4.0
#addin nuget:?package=Onion.Maui.GoogleMaps.Clustering&version=6.4.0Install as a Cake Addin
#tool nuget:?package=Onion.Maui.GoogleMaps.Clustering&version=6.4.0Install as a Cake Tool
👁 NuGet
👁 alternate text is missing from this package README image
Maps library for MAUI that uses Google maps on both mobile platforms - Android and iOS.
Usage is almost the same as Xamarin.Forms.GoogleMaps - github because it was forked from it. More information about library capabilities can be found there. Please note that after the migration to MAUI some properties, events or commands may have been omitted. Also, the namespace is Maui.GoogleMaps instead of Xamarin.Forms.GoogleMaps.
| Platform | Supported |
|---|---|
| iOS | Yes |
| Android | Yes |
| Windows 10/11 | No |
| Others | No |
// MainApplication.cs
[Application]
[MetaData("com.google.android.maps.v2.API_KEY",
Value = Variables.GOOGLE_MAPS_ANDROID_API_KEY)]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{ }
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
And in the MauiProgram.cs file
// MauiProgram.cs
using Maui.GoogleMaps.Hosting;
...
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder.UseMauiApp<App>();
#if ANDROID
builder.UseGoogleMaps();
#elif IOS
builder.UseGoogleMaps(Variables.GOOGLE_MAPS_IOS_API_KEY);
#endif
return builder.Build();
}
If you need clustering, install 👁 NuGet
and add this line:
builder.UseGoogleMapsClustering();
For more information on clustering and regular map usage check out sample app:
I really appreciate your contribution. If u have spotted a bug you want to fix or have a feature/enhancement you would like to implement please open a pull request targeting the maui branch. If u have any questions you are free to reach out to me - all contact info is available in my profile.
See .
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-android36.0 net10.0-android36.0 is compatible. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-ios26.0 net10.0-ios26.0 is compatible. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
# 6.4.0
- Updated dependencies