Class SpeedLimitsRequest
- Namespace
- GoogleMapsApi.Entities.Roads.Request
- Assembly
- GoogleMapsApi.dll
Request for the Roads API Speed Limits endpoint
(GET https://roads.googleapis.com/v1/speedLimits). Returns the posted speed limit for a
road segment, either by snapping a Path or by looking up known PlaceIds.
public sealed class SpeedLimitsRequest : MapsBaseRequest
- Inheritance
-
SpeedLimitsRequest
- Inherited Members
Remarks
The Speed Limits service is only available to customers with an Asset Tracking license; other keys receive an HTTP 403. Each returned speed limit is separately billable. Exactly one of Path or PlaceIds must be supplied. See https://developers.google.com/maps/documentation/roads/speed-limits.
Fields
MaxItems
Maximum number of points or place IDs accepted in a single request.
public const int MaxItems = 100
Field Value
Properties
Path
public IEnumerable<Location>? Path { get; set; }
Property Value
PlaceIds
Road-segment place IDs (e.g. from a prior Snap to Roads call) to return speed limits for; 1 to MaxItems IDs. Mutually exclusive with Path.
public IEnumerable<string>? PlaceIds { get; set; }
Property Value
Units
Unit system for the returned speed limits. Defaults to the API default (KPH).
public SpeedUnits? Units { get; set; }
Property Value
Methods
GetUri()
Builds the absolute request URI, including scheme, base URL, and serialized query-string parameters.
public override Uri GetUri()
Returns
- Uri
The fully composed URI to send to the Google Maps API.