AarxMaps.Routes
1.0.0
Prefix Reserved
dotnet add package AarxMaps.Routes --version 1.0.0
NuGet\Install-Package AarxMaps.Routes -Version 1.0.0
<PackageReference Include="AarxMaps.Routes" Version="1.0.0" />
<PackageVersion Include="AarxMaps.Routes" Version="1.0.0" />
<PackageReference Include="AarxMaps.Routes" />
paket add AarxMaps.Routes --version 1.0.0
#r "nuget: AarxMaps.Routes, 1.0.0"
#:package AarxMaps.Routes@1.0.0
#addin nuget:?package=AarxMaps.Routes&version=1.0.0
#tool nuget:?package=AarxMaps.Routes&version=1.0.0
AarxMaps
Strongly typed .NET SDK for the Google Maps Platform: Places API (New) and Routes API, with fluent request builders, dependency injection, typed exceptions and optional response caching.
| Package | What it gives you |
|---|---|
AarxMaps.Core |
Configuration, DI entry point, HTTP client, exceptions, caching, LatLng |
AarxMaps.Places |
Autocomplete, Text Search, Nearby Search, Place Details, Photos, Reviews |
AarxMaps.Routes |
Directions (computeRoutes) and Distance Matrix (computeRouteMatrix) |
Runs on .NET 10 and later. MIT licensed.
Documentation: aarexus.github.io/AarxMaps
Requirements
- .NET 10 or later. Apps on .NET 8 or 9 can't install the packages until they upgrade.
- A Google Cloud API key with the APIs you use enabled: Places API (New) for
AarxMaps.Places, Routes API forAarxMaps.Routes. The legacy Places API is not used. - Billing enabled on the Google Cloud project. Every call in this SDK is a billed Google request.
Installation
dotnet add package AarxMaps.Places # pulls in AarxMaps.Core
dotnet add package AarxMaps.Routes # pulls in AarxMaps.Core
Install AarxMaps.Core on its own only to call Google endpoints directly through IMapsApiClient, without a feature module. See Custom endpoints.
Quick start
Store the API key in user secrets, under the AarxMaps section that AddAarxMaps binds:
dotnet user-secrets init
dotnet user-secrets set "AarxMaps:ApiKey" "YOUR_API_KEY"
ASP.NET Core (Program.cs):
using AarxMaps.Core.Extensions;
using AarxMaps.Core.Models.Geometry;
using AarxMaps.Places.Common.Extensions;
using AarxMaps.Places.Services;
using AarxMaps.Places.Services.Searching;
using AarxMaps.Routes.Common.Extensions;
using AarxMaps.Routes.Common.Models;
using AarxMaps.Routes.Services;
using AarxMaps.Routes.Services.Directions;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAarxMaps(o =>
builder.Configuration.GetSection("AarxMaps").Bind(o));
builder.Services.AddAarxMapsPlaces();
builder.Services.AddAarxMapsRoutes();
var app = builder.Build();
app.MapGet("/coffee", async (IPlacesService places, CancellationToken ct) => {
var request = new TextRequestBuilder()
.WithTextQuery("coffee in Seattle")
.WithPageSize(5)
.Build();
var result = await places.Search.SearchByTextAsync(request, ct);
return result.Places.Select(p => new { p.PlaceId, p.DisplayName });
});
app.MapGet("/route", async (IRoutesService routes, CancellationToken ct) => {
var spaceNeedle = new LatLng(47.6205, -122.3493);
var request = new RouteRequestBuilder()
.From(new WaypointBuilder().FromAddress("Pike Place Market").Build())
.To(new WaypointBuilder().FromLocation(spaceNeedle).Build())
.WithTravelMode(TravelMode.Drive)
.Build();
var result = await routes.Directions.GetRoutesAsync(request, ct: ct);
var route = result.Routes
.FirstOrDefault(r => r.Labels.Contains(RouteLabel.DefaultRoute));
return route is null
? Results.NotFound()
: Results.Ok(new { route.DistanceMeters, route.Duration });
});
app.Run();
For a console app without a host, and the services you can inject, see the Quick start page.
Documentation
- Getting started: Introduction, Installation, Quick start
- Core: Configuration and registration, Caching, Errors, Cancellation and timeouts, Coordinates, Custom endpoints
- Places: Overview, Search areas, Autocomplete, Text search, Nearby search, Place details, Photos and reviews
- Routes: Overview, Waypoints, Directions, Route results, Distance matrix, Option rules by travel mode
- Known limitations
- Coming from DelgadoMaps: every renamed type and member, for users of the
D3lg4doMaps.*packages.
License
MIT. See LICENSE.
Not affiliated with or endorsed by Google. Use of Google Maps Platform is subject to Google's terms of service.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- AarxMaps.Core (>= 1.0.0)
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 |
|---|---|---|
| 1.0.0 | 91 | 11/4/2026 |
First release of AarxMaps, formerly D3lg4doMaps. Requires .NET 10. Release notes: https://github.com/Aarexus/AarxMaps/releases/tag/v1.0.0