# Maui Maps

> >

- **Type:** Skill
- **Install:** `agentstack add skill-davidortinau-maui-skills-maui-maps`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [davidortinau](https://agentstack.voostack.com/s/davidortinau)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [davidortinau](https://github.com/davidortinau)
- **Source:** https://github.com/davidortinau/maui-skills/tree/main/plugins/maui-skills/skills/maui-maps

## Install

```sh
agentstack add skill-davidortinau-maui-skills-maui-maps
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# .NET MAUI Maps

## Common gotchas

| Issue | Fix |
|---|---|
| Map is blank on Android | Google Maps API key missing or wrong in `AndroidManifest.xml` |
| Map crashes on startup | `.UseMauiMaps()` not called in `MauiProgram.cs` |
| `Map` type ambiguous | Conflicts with `Microsoft.Maui.ApplicationModel.Map` — add namespace alias |
| Map doesn't show on Windows | Windows has no native support — must use `CommunityToolkit.Maui.Maps` |
| User location dot missing | `IsShowingUser="True"` set but location permission not granted |
| Android 11+ can't launch external map app | Missing `` for `geo` scheme in manifest |

## ⚠️ Name conflict — always alias

`Microsoft.Maui.Controls.Maps.Map` conflicts with `Microsoft.Maui.ApplicationModel.Map`. This causes confusing compile errors.

```csharp
// ✅ Correct — explicit alias
using Map = Microsoft.Maui.Controls.Maps.Map;
```

```xml

xmlns:maps="clr-namespace:Microsoft.Maui.Controls.Maps;assembly=Microsoft.Maui.Controls.Maps"

```

## Platform setup pitfalls

### Android — API key must be inside ``

```xml

  

```

⚠️ Also required: Google Play Services version meta-data and `` for geo scheme on API 30+ (see `references/maps-api.md`).

### iOS / Mac Catalyst

⚠️ Without `NSLocationWhenInUseUsageDescription` in `Info.plist`, location permission is denied without prompt.

### Windows — no native support

Must add `CommunityToolkit.Maui.Maps` + Bing key. Use conditional package reference and `#if WINDOWS` for setup.

## MauiProgram.cs — don't forget UseMauiMaps

```csharp
// ✅ Required — without this, Map control throws at runtime
builder.UseMauiMaps();

// ❌ Forgetting this causes "No registered handler for Map" crash
```

## Performance tips

- ⚠️ **Don't add hundreds of pins directly** — use `ItemsSource` with data binding for large pin sets.
- **Set initial region** with `MoveToRegion()` to avoid the default world view zoom animation.
- **Avoid frequent `MoveToRegion()` calls** — each triggers a map animation; debounce if driven by data changes.

## Data-bound pins — do this for dynamic data

```xml

    
        
            
        
    

```

## Decision framework

| Need | Approach |
|---|---|
| Basic map with pins | `Map` control + `Pins.Add()` or `ItemsSource` binding |
| Map with shapes | `MapElements` — `Polygon`, `Polyline`, `Circle` |
| Address → coordinates | `Geocoding.Default.GetLocationsAsync(address)` |
| Coordinates → address | `Geocoding.Default.GetPlacemarksAsync(lat, lon)` |
| Custom map overlays | Use handlers to access native map APIs |
| Windows support | Must add `CommunityToolkit.Maui.Maps` + Bing key |

## Quick checklist

- [ ] NuGet: `Microsoft.Maui.Controls.Maps` added
- [ ] `.UseMauiMaps()` called in `MauiProgram.cs`
- [ ] Android: Google Maps API key inside `` in `AndroidManifest.xml`
- [ ] Android: Google Play Services version meta-data present
- [ ] Android 11+: `` for geo scheme added
- [ ] iOS/Mac: `NSLocationWhenInUseUsageDescription` in `Info.plist`
- [ ] Windows: `CommunityToolkit.Maui.Maps` + Bing Maps key (conditional)
- [ ] Namespace alias added to avoid `Map` type conflict

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [davidortinau](https://github.com/davidortinau)
- **Source:** [davidortinau/maui-skills](https://github.com/davidortinau/maui-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-davidortinau-maui-skills-maui-maps
- Seller: https://agentstack.voostack.com/s/davidortinau
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
