Table of Contents

Class GoogleMapsClient

Namespace
GoogleMapsApi
Assembly
GoogleMapsApi.dll

Instance-based Google Maps client driven by an injected HttpClient. It is friendly to IHttpClientFactory, supports per-instance event handlers, and avoids the testability problems of static state.

public sealed class GoogleMapsClient : IGoogleMapsClient
Inheritance
GoogleMapsClient
Implements
Inherited Members

Constructors

GoogleMapsClient(HttpClient)

Creates a client that uses the supplied HttpClient with default options (no ambient API key — callers must set ApiKey on each request).

public GoogleMapsClient(HttpClient httpClient)

Parameters

httpClient HttpClient

GoogleMapsClient(HttpClient, GoogleMapsClientOptions)

Creates a client that uses the supplied HttpClient and options.

public GoogleMapsClient(HttpClient httpClient, GoogleMapsClientOptions options)

Parameters

httpClient HttpClient

The HTTP client used for every API call. Typically obtained from IHttpClientFactory.

options GoogleMapsClientOptions

Ambient options applied to every request (e.g. default API key).

Properties

AddressValidation

Validate a postal address (Address Validation API). Supports USPS CASS for US/PR addresses.

public IEngineFacade<AddressValidationRequest, AddressValidationResponse> AddressValidation { get; }

Property Value

IEngineFacade<AddressValidationRequest, AddressValidationResponse>

AerialView

Render and look up cinematic flyover videos via the Aerial View API.

public IAerialViewApi AerialView { get; }

Property Value

IAerialViewApi

AirQualityCurrentConditions

Get current hourly air-quality conditions for a coordinate via the Air Quality API (billable).

public IEngineFacade<CurrentConditionsRequest, CurrentConditionsResponse> AirQualityCurrentConditions { get; }

Property Value

IEngineFacade<CurrentConditionsRequest, CurrentConditionsResponse>

AirQualityForecast

Get an hourly air-quality forecast for a coordinate via the Air Quality API (billable).

public IEngineFacade<ForecastRequest, ForecastResponse> AirQualityForecast { get; }

Property Value

IEngineFacade<ForecastRequest, ForecastResponse>

AirQualityHeatmapTile

Download an air-quality heatmap map tile as raw PNG bytes via the Air Quality API (billable).

public IEngineFacade<HeatmapTileRequest, HeatmapTileResponse> AirQualityHeatmapTile { get; }

Property Value

IEngineFacade<HeatmapTileRequest, HeatmapTileResponse>

AirQualityHistory

Get past hourly air-quality records for a coordinate via the Air Quality API (billable).

public IEngineFacade<HistoryRequest, HistoryResponse> AirQualityHistory { get; }

Property Value

IEngineFacade<HistoryRequest, HistoryResponse>

Directions

Perform directions operations.

public IEngineFacade<DirectionsRequest, DirectionsResponse> Directions { get; }

Property Value

IEngineFacade<DirectionsRequest, DirectionsResponse>

DistanceMatrix

Retrieve duration and distance values based on the recommended route between start and end points.

public IEngineFacade<DistanceMatrixRequest, DistanceMatrixResponse> DistanceMatrix { get; }

Property Value

IEngineFacade<DistanceMatrixRequest, DistanceMatrixResponse>

Elevation

Perform elevation operations.

public IEngineFacade<ElevationRequest, ElevationResponse> Elevation { get; }

Property Value

IEngineFacade<ElevationRequest, ElevationResponse>

Geocode

Perform geocoding operations.

public IEngineFacade<GeocodingRequest, GeocodingResponse> Geocode { get; }

Property Value

IEngineFacade<GeocodingRequest, GeocodingResponse>

NearestRoads

Find the nearest road segment for each of a set of points (Roads API).

public IEngineFacade<NearestRoadsRequest, NearestRoadsResponse> NearestRoads { get; }

Property Value

IEngineFacade<NearestRoadsRequest, NearestRoadsResponse>

PlaceDetailsNew

Fetch rich details about a single place via the Places API (New).

public IEngineFacade<PlaceDetailsRequest, Place> PlaceDetailsNew { get; }

Property Value

IEngineFacade<PlaceDetailsRequest, Place>

PlacePhoto

Resolve a place photo reference to an image URI via the Places API (New).

public IEngineFacade<PlacePhotoRequest, PlacePhotoResponse> PlacePhoto { get; }

Property Value

IEngineFacade<PlacePhotoRequest, PlacePhotoResponse>

PlacesAutocompleteNew

Get place/query predictions for typed input via the Places API (New).

public IEngineFacade<AutocompleteRequest, AutocompleteResponse> PlacesAutocompleteNew { get; }

Property Value

IEngineFacade<AutocompleteRequest, AutocompleteResponse>

PlacesSearchNearby

Search for places near a location via the Places API (New).

public IEngineFacade<SearchNearbyRequest, SearchNearbyResponse> PlacesSearchNearby { get; }

Property Value

IEngineFacade<SearchNearbyRequest, SearchNearbyResponse>

PlacesSearchText

Search for places by free-text query via the Places API (New).

public IEngineFacade<SearchTextRequest, SearchTextResponse> PlacesSearchText { get; }

Property Value

IEngineFacade<SearchTextRequest, SearchTextResponse>

PollenForecast

Get a multi-day pollen forecast (types and plants) for a coordinate via the Pollen API (billable).

public IEngineFacade<PollenForecastRequest, PollenForecastResponse> PollenForecast { get; }

Property Value

IEngineFacade<PollenForecastRequest, PollenForecastResponse>

PollenHeatmapTile

Download a pollen heatmap map tile as raw PNG bytes via the Pollen API (billable).

public IEngineFacade<PollenHeatmapTileRequest, PollenHeatmapTileResponse> PollenHeatmapTile { get; }

Property Value

IEngineFacade<PollenHeatmapTileRequest, PollenHeatmapTileResponse>

Routes

Compute routes via the Routes API — the modern replacement for the Directions API.

public IEngineFacade<RoutesRequest, RoutesResponse> Routes { get; }

Property Value

IEngineFacade<RoutesRequest, RoutesResponse>

SnapToRoads

Snap GPS points to the most likely road segments traveled (Roads API).

public IEngineFacade<SnapToRoadsRequest, SnapToRoadsResponse> SnapToRoads { get; }

Property Value

IEngineFacade<SnapToRoadsRequest, SnapToRoadsResponse>

SolarBuildingInsights

Get solar potential, roof geometry and financial analyses for a building via the Solar API (billable).

public IEngineFacade<BuildingInsightsRequest, BuildingInsightsResponse> SolarBuildingInsights { get; }

Property Value

IEngineFacade<BuildingInsightsRequest, BuildingInsightsResponse>

SolarDataLayers

Get URLs to solar raster data layers for a region via the Solar API (billable).

public IEngineFacade<DataLayersRequest, DataLayersResponse> SolarDataLayers { get; }

Property Value

IEngineFacade<DataLayersRequest, DataLayersResponse>

SolarGeoTiff

Download a Solar API data layer as raw GeoTIFF bytes (billable).

public IEngineFacade<GeoTiffRequest, GeoTiffResponse> SolarGeoTiff { get; }

Property Value

IEngineFacade<GeoTiffRequest, GeoTiffResponse>

SpeedLimits

Look up posted speed limits along a path or for place IDs (Roads API). Requires a Google Asset Tracking license; other keys receive an HTTP 403.

public IEngineFacade<SpeedLimitsRequest, SpeedLimitsResponse> SpeedLimits { get; }

Property Value

IEngineFacade<SpeedLimitsRequest, SpeedLimitsResponse>

TimeZone

Retrieve time zone data for a coordinate.

public IEngineFacade<TimeZoneRequest, TimeZoneResponse> TimeZone { get; }

Property Value

IEngineFacade<TimeZoneRequest, TimeZoneResponse>