VOOZH about

URL: https://www.nuget.org/packages/Mile15.Maui.Controls.Maps/

⇱ NuGet Gallery | Mile15.Maui.Controls.Maps 0.0.1-alpha.388




Mile15.Maui.Controls.Maps 0.0.1-alpha.388

This is a prerelease version of Mile15.Maui.Controls.Maps.
dotnet add package Mile15.Maui.Controls.Maps --version 0.0.1-alpha.388
 
 
NuGet\Install-Package Mile15.Maui.Controls.Maps -Version 0.0.1-alpha.388
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Mile15.Maui.Controls.Maps" Version="0.0.1-alpha.388" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Mile15.Maui.Controls.Maps" Version="0.0.1-alpha.388" />
 
Directory.Packages.props
<PackageReference Include="Mile15.Maui.Controls.Maps" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Mile15.Maui.Controls.Maps --version 0.0.1-alpha.388
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Mile15.Maui.Controls.Maps, 0.0.1-alpha.388"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Mile15.Maui.Controls.Maps@0.0.1-alpha.388
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Mile15.Maui.Controls.Maps&version=0.0.1-alpha.388&prerelease
 
Install as a Cake Addin
#tool nuget:?package=Mile15.Maui.Controls.Maps&version=0.0.1-alpha.388&prerelease
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Mile15.Maui.Controls.Maps

A rich, cross-platform map control for .NET MAUI applications targeting Android, iOS, and macOS (Mac Catalyst). It wraps the native Google Maps SDK (Android) and MapKit (iOS / macOS) and exposes a unified MAUI-friendly API of bindable map objects, commands, and programmatic camera controls.


Table of Contents


Requirements

Platform Minimum OS
Android API 21 (Android 5.0)
iOS 15.0
macOS (Mac Catalyst) 15.0

.NET SDK: .NET 10 or later with the maui workload installed.


Installation

dotnet add package Mile15.Maui.Controls.Maps

Or via the NuGet Package Manager in Visual Studio: search for Mile15.Maui.Controls.Maps.


Handler Registration

Register the MapHandler inside your MauiProgram.cs before calling Build():

using Mile15.Maui.Controls.Maps.Handlers.Map;
using Mile15.Maui.Controls.Maps.Controls;

public static class MauiProgram
{
 public static MauiApp CreateMauiApp()
 {
 var builder = MauiApp.CreateBuilder();

 builder
 .UseMauiApp<App>()
 .ConfigureMauiHandlers(handlers =>
 {
 handlers.AddHandler<Map, MapHandler>();
 });

 return builder.Build();
 }
}

Android

Add your Google Maps API key to AndroidManifest.xml:

<meta-data android:name="com.google.android.maps.v2.API_KEY"
 android:value="YOUR_API_KEY_HERE" />

iOS / macOS

No additional manifest changes are required. Ensure your app's entitlements include location permissions if IsShowingUser is enabled.


Quick Start

XAML

<ContentPage
 xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
 xmlns:maps="clr-namespace:Mile15.Maui.Controls.Maps.Controls;assembly=Mile15.Maui.Controls.Maps">

 <maps:Map
 MapType="Street"
 IsShowingUser="True"
 IsScrollEnabled="True"
 IsZoomEnabled="True"
 MapObjects="{Binding MapObjects}" />

</ContentPage>

Code-behind / ViewModel

using Mile15.Maui.Controls.Maps.Collections;
using Mile15.Maui.Controls.Maps.Map.Maps;
using Microsoft.Maui.Maps;

// Create a collection of map objects
var mapObjects = new ObservableNotifiableCollection<IMapObject>
{
 new AnnotationMapObject
 {
 Name = "Mile15 HQ",
 Description = "Our headquarters",
 Point = new Point(35.9940, -86.8318),
 ImageSource = "pin.png"
 },
 new PolygonMapObject
 {
 Name = "Service Area",
 FillColor = Colors.Blue.WithAlpha(0.3f),
 StrokeColor = Colors.Blue,
 StrokeWidth = 2,
 Points = new List<Point>
 {
 new(36.00, -86.84),
 new(36.00, -86.82),
 new(35.98, -86.82),
 new(35.98, -86.84)
 }
 }
};

MyMap.MapObjects = mapObjects;

Map Control Properties

Property Type Default Description
MapType MapType Street Street, Satellite, or Hybrid map tiles
MapObjects ObservableNotifiableCollection<IMapObject> [] Collection of overlays and annotations rendered on the map
MapSpan MapSpan Programmatically set the visible map region
VisibleRegion MapSpan? Read-only; reflects the current visible region
CenterCoordinate Point Center of the visible region as a geographic coordinate
IsShowingUser bool false Shows the device's current location indicator
IsScrollEnabled bool true Allows the user to pan the map
IsZoomEnabled bool true Allows the user to pinch-to-zoom
HasRotationEnabled bool false Allows the user to rotate the map
IsTrafficEnabled bool false Shows live traffic overlay (where available)
AllowMultiplePolygonSelection bool false When true, multiple polygons can be selected simultaneously
Extents Extents Read-only bounding box that encompasses all IsZoomAllContributor map objects

Map Object Types

All map objects inherit from MapObject, which provides the following shared bindable properties:

Property Type Description
Name string Display name
Description string Secondary text / tooltip
Tag object Arbitrary user data
DataTag object Secondary arbitrary user data
IsSelected bool Whether the object is currently selected
IsSelectable bool Whether the object can be selected by the user
IsZoomAllContributor bool Whether the object is included when auto-fitting the camera
Extents Extents Computed bounding box of this object
Type MapObjectType Enum discriminator (Annotation, Polygon, Polyline, Image, TileOverlay)

AnnotationMapObject

A point marker placed at a geographic coordinate, optionally decorated with custom imagery.

new AnnotationMapObject
{
 Point = new Point(latitude, longitude),
 ImageSource = "custom_pin.png", // resource name or URI
 ImageWidth = 24,
 ImageHeight = 24,
 ImageColor = Colors.Red,
 ImageSourceRotation = 45, // degrees
 ImageSourceBackImage = "pin_background.png",
 ImageSourceSuperImage = "pin_overlay.png",
}
Property Type Default
Point Point (0, 0)
ImageSource string ""
ImageWidth double 12
ImageHeight double 12
ImageColor Color White
ImageSourceRotation double 0
ImageSourceBackImage string ""
ImageSourceSuperImage string ""

PolygonMapObject

A closed geographic shape with an optional fill and configurable stroke.

new PolygonMapObject
{
 FillColor = Colors.Green.WithAlpha(0.25f),
 StrokeColor = Colors.Green,
 StrokeWidth = 3,
 ZIndex = 2,
 Points = new List<Point> { /* lat/lng pairs */ }
}
Property Type Default
FillColor Color Transparent
StrokeColor Color Transparent
StrokeWidth double 1.0
ZIndex float 1.0
SeriesId long 0
Points IList<Point> []

PolylineMapObject

An open geographic path. Shares all stroke and Points properties from GeoMapObject.

new PolylineMapObject
{
 StrokeColor = Colors.Orange,
 StrokeWidth = 4,
 Points = new List<Point> { /* lat/lng pairs */ }
}

ImageMapObject

Stretches an image over a geographic bounding box.

new ImageMapObject
{
 ImageSource = "field_overlay.png",
 TopLeft = new Point(36.001, -86.841),
 BottomRight = new Point(35.990, -86.820)
}
Property Type Default
ImageSource string ""
TopLeft Point (0, 0)
BottomRight Point (0, 0)

TileOverlayMapObject

Renders a slippy-map tile layer from a custom URL template. The URL should contain {x}, {y}, and {z} placeholders.

new TileOverlayMapObject
{
 CustomTileUrl = "https://tiles.example.com/{z}/{x}/{y}.png"
}

Commands

Bind these ICommand properties on the Map control to react to user interactions in your ViewModel.

Command Parameter type Fired when
PolygonSelectedCommand PolygonMapObject A polygon is tapped / selected
PolygonDeselectedCommand PolygonMapObject A polygon is deselected
NoPolygonSelectedCommand The user taps empty space, deselecting all polygons
AnnotationSelectedCommand AnnotationMapObject An annotation pin is tapped
AnnotationDeselectedCommand AnnotationMapObject An annotation is deselected
NoAnnotationSelectedCommand The user taps empty space, deselecting all annotations
AnnotationCalloutCommand AnnotationMapObject The callout bubble of an annotation is tapped
PolylineSelectedCommand PolylineMapObject A polyline is tapped
UserInteractionCommand Location The user pans or taps the map
RegionChangedCommand MapSpan The visible region finishes changing
RegionWillChangeCommand MapSpan The visible region is about to change

Programmatic Camera Control

All methods are available on the Map control instance and can also be invoked from a ViewModel via the IMap interface.

// Pan and zoom to a specific region
map.MoveToRegion(new MapSpan(new Location(35.994, -86.832), 0.05, 0.05));

// Fit the camera to all IsZoomAllContributor objects
map.ZoomToExtents(animate: true);

// Fit the camera to a single map object's extents
map.ZoomToMapObject(myPolygon, animate: true);

// Pan to center on a map object without changing zoom
map.CenterOnMapObject(myAnnotation, animate: true);

// Programmatically deselect an annotation
map.DeselectAnnotation(myAnnotation);

Extents

Extents is a lightweight bounding-box value type used throughout the library.

var extents = new Extents(
 topLeft: new Location(36.001, -86.841),
 bottomRight: new Location(35.990, -86.820)
);

Location center = extents.GetCenterLocation();

The Map.Extents property automatically recomputes its value whenever MapObjects changes, giving you a live bounding box of all contributing objects.


License

This package is distributed under the .
Copyright © 2026 Mile15, LLC. All rights reserved.

Product Versions Compatible and additional computed target framework versions.
.NET net10.0-android36.0 net10.0-android36.0 is compatible.  net10.0-ios26.0 net10.0-ios26.0 is compatible.  net10.0-maccatalyst26.0 net10.0-maccatalyst26.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.1-alpha.388 52 6/14/2026
0.0.1-alpha.387 50 6/13/2026
0.0.1-alpha.386 45 6/13/2026
0.0.1-alpha.385 46 6/13/2026