AarxMaps.Core 1.0.0

Prefix Reserved
dotnet add package AarxMaps.Core --version 1.0.0
                    
NuGet\Install-Package AarxMaps.Core -Version 1.0.0
                    
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="AarxMaps.Core" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AarxMaps.Core" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="AarxMaps.Core" />
                    
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 AarxMaps.Core --version 1.0.0
                    
#r "nuget: AarxMaps.Core, 1.0.0"
                    
#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 AarxMaps.Core@1.0.0
                    
#: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=AarxMaps.Core&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=AarxMaps.Core&version=1.0.0
                    
Install as a Cake Tool

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 for AarxMaps.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

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on AarxMaps.Core:

Package Downloads
AarxMaps.Places

.NET SDK for the Google Maps Places API (New). Provides strongly-typed access to place search, details, autocomplete, and photos, with built-in dependency injection support for ASP.NET Core applications.

AarxMaps.Routes

.NET SDK for the Google Maps Routes API. Provides strongly-typed access to Compute Routes and Route Matrix (Distance Matrix), with built-in dependency injection support for ASP.NET Core applications.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 109 11/4/2026

First release of AarxMaps, formerly D3lg4doMaps. Requires .NET 10. Release notes: https://github.com/Aarexus/AarxMaps/releases/tag/v1.0.0