Table of Contents

Class Waypoint

Namespace
GoogleMapsApi.Entities.Routes.Request
Assembly
GoogleMapsApi.dll

Origin, destination, or intermediate stop on a route. Set exactly one of Location, PlaceId, or Address.

public sealed class Waypoint
Inheritance
Waypoint
Inherited Members

Properties

Address

Free-text address; geocoded by the API at request time.

[JsonPropertyName("address")]
public string? Address { get; set; }

Property Value

string

Location

Latitude / longitude (with optional heading) of this waypoint.

[JsonPropertyName("location")]
public WaypointLocation? Location { get; set; }

Property Value

WaypointLocation

PlaceId

Google Places place ID — the preferred way to specify a waypoint when known, since it bypasses geocoding ambiguity.

[JsonPropertyName("placeId")]
public string? PlaceId { get; set; }

Property Value

string

SideOfRoad

True if the waypoint is on a particular side of the road (so the route prefers approaches from that side). Driving routes only.

[JsonPropertyName("sideOfRoad")]
public bool? SideOfRoad { get; set; }

Property Value

bool?

VehicleStopover

True if the waypoint is intended as a stop where the vehicle parks. Affects guidance for the leg and U-turn preferences.

[JsonPropertyName("vehicleStopover")]
public bool? VehicleStopover { get; set; }

Property Value

bool?

Via

True if this waypoint is a pass-through point (no stop). Only meaningful for intermediate waypoints; ignored for origin/destination.

[JsonPropertyName("via")]
public bool? Via { get; set; }

Property Value

bool?

Methods

FromAddress(string)

Creates a waypoint from a free-text address.

public static Waypoint FromAddress(string address)

Parameters

address string

Returns

Waypoint

FromCoordinates(double, double)

Creates a waypoint from a latitude/longitude pair.

public static Waypoint FromCoordinates(double latitude, double longitude)

Parameters

latitude double
longitude double

Returns

Waypoint

FromPlaceId(string)

Creates a waypoint from a Places place ID.

public static Waypoint FromPlaceId(string placeId)

Parameters

placeId string

Returns

Waypoint