Skip to content

Add packaged README for Microsoft.Maui.Controls.Maps with quick start guidance#33196

Merged
jfversluis merged 9 commits intomainfrom
copilot/add-readme-to-maps-nuget
Jan 6, 2026
Merged

Add packaged README for Microsoft.Maui.Controls.Maps with quick start guidance#33196
jfversluis merged 9 commits intomainfrom
copilot/add-readme-to-maps-nuget

Conversation

Copy link
Contributor

Copilot AI commented Dec 17, 2025

  • Update Circle sample to use Location/Distance objects instead of string Center and numeric Radius
  • Validation (doc-only change; no automated tests run)
Original prompt

Take what you did for #32835 and apply it to the Maps NuGet as well. You can add the README in the root of the Maps project folder and link it from there. Make sure it gives a good description on how to get started with the Maps APIs. You can also find more information here: https://learn.microsoft.com/dotnet/maui/user-interface/controls/map?view=net-maui-10.0 make sure to also link there from this README. The README should be part of the NuGet package.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copilot AI changed the title [WIP] Add README for getting started with Maps APIs Add packaged README for Microsoft.Maui.Controls.Maps with quick start guidance Dec 17, 2025
Copilot AI requested a review from jfversluis December 17, 2025 09:03
@jfversluis
Copy link
Member

@copilot can you add a little bit more about different features like pins, polygons and what else is available?

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 17, 2025

@copilot can you add a little bit more about different features like pins, polygons and what else is available?

Added a new feature summary section covering pins, polygons/polylines/circles, map interactions (MapClicked, camera/region control), and map display options in the README. Commit: 4f34777.

@jfversluis
Copy link
Member

@copilot do not only add them at a glance, add some samples of that as well

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 17, 2025

@copilot do not only add them at a glance, add some samples of that as well

Added concrete XAML samples for pins plus polygon, polyline, and circle (with MapClicked hook) in the README. Commit: 88a1db8.

@jfversluis
Copy link
Member

@copilot lets remove this from the link to the docs ?view=net-maui-10.0 also add samples for interactions, different maps modes, and what else you can come up with that is important to know about working with maps. Leverage online sources to see what people are asking about maps and include that

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 17, 2025

@copilot lets remove this from the link to the docs ?view=net-maui-10.0 also add samples for interactions, different maps modes, and what else you can come up with that is important to know about work...

Updated the README to use the version-agnostic docs link and added runnable samples for interactions (MapClicked drop pin + MoveToRegion), map mode toggle, and common runtime toggles like showing user location and traffic. Commit: 0f291c9.

@jfversluis jfversluis marked this pull request as ready for review December 17, 2025 09:59
Copilot AI review requested due to automatic review settings December 17, 2025 09:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a packaged README file to the Microsoft.Maui.Controls.Maps NuGet package to help developers get started with the Maps API. The README includes setup instructions, platform-specific configuration guidance, XAML examples, and links to official documentation.

Key Changes

  • Added NuGet package README with quick start guide and sample code
  • Configured package metadata to include the README in the NuGet package
  • Documented platform support (Android and iOS working, Windows not yet implemented)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Controls/Maps/src/Controls.Maps.csproj Added PackageReadmeFile property and configured the README.md to be included in the NuGet package
src/Controls/Maps/README.md New comprehensive README with setup instructions, XAML samples, code examples, and links to official documentation

@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing Dec 30, 2025
@PureWeen
Copy link
Member

@copilot

Can you evaluate this review and see if you agree with the suggestions?

PR Review: Maps README

Thanks for adding the README to the Maps NuGet package! The structure and content are great, but I found a few issues that need to be addressed before merging.

🔴 Critical: Non-existent LocationCollection class

The XAML samples use <maps:LocationCollection> which does not exist in the .NET MAUI codebase. This will cause XAML compilation failures for users following the README.

Current (incorrect):

<maps:Polygon.Geopath>
    <maps:LocationCollection>
        <essentials:Location Latitude="47.642" Longitude="-122.323" />
    </maps:LocationCollection>
</maps:Polygon.Geopath>

Should be (per official docs):

<maps:Polygon.Geopath>
    <sensors:Location>
        <x:Arguments>
            <x:Double>47.642</x:Double>
            <x:Double>-122.323</x:Double>
        </x:Arguments>
    </sensors:Location>
    <sensors:Location>
        <x:Arguments>
            <x:Double>47.643</x:Double>
            <x:Double>-122.326</x:Double>
        </x:Arguments>
    </sensors:Location>
</maps:Polygon.Geopath>

The Geopath property is IList<Location> - XAML should add Location elements directly to it.

🟡 Namespace declarations

The namespace declarations don't match the official documentation pattern:

Current:

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

Should be:

xmlns:maps="http://schemas.microsoft.com/dotnet/2021/maui/maps"
xmlns:sensors="clr-namespace:Microsoft.Maui.Devices.Sensors;assembly=Microsoft.Maui.Essentials"

🟢 Minor: Location property syntax

The README uses property syntax (Latitude="..." Longitude="..."), while official samples consistently use constructor syntax with x:Arguments. Both may work, but using constructor syntax would be more consistent with official documentation.


✅ What looks good

Co-authored-by: PureWeen <5375137+PureWeen@users.noreply.github.com>
@PureWeen
Copy link
Member

@copilot Copilot can you try again please

@PureWeen
Copy link
Member

@copilot can you try again please

@PureWeen
Copy link
Member

@copilot copilot can you try again please?

@PureWeen
Copy link
Member

PureWeen commented Jan 2, 2026

@copilot can you try again?

- Remove non-existent LocationCollection wrapper from Geopath samples
- Use correct xmlns:maps URL (http://schemas.microsoft.com/dotnet/2021/maui/maps)
- Use xmlns:sensors instead of xmlns:essentials with correct assembly
- Use constructor syntax with x:Arguments for Location (matches official samples)

Addresses review feedback from PR #33196
@PureWeen
Copy link
Member

PureWeen commented Jan 5, 2026

@copilot can you try again?

@jfversluis jfversluis merged commit a6e9730 into main Jan 6, 2026
4 of 23 checks passed
@jfversluis jfversluis deleted the copilot/add-readme-to-maps-nuget branch January 6, 2026 15:12
@github-project-automation github-project-automation bot moved this from Ready To Review to Done in MAUI SDK Ongoing Jan 6, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-ai area-controls-map Map / Maps p/0 Current heighest priority issues that we are targeting for a release.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants