Delen via


Snap to Road Data

Note

Bing Maps Snap Points to Roads API retirement

Bing Maps Snap Points to Roads API is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps Snap Points to Roads API until June 30th, 2025. Enterprise account customers can continue to use Bing Maps Snap Points to Roads API until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps Snap Points to Roads API will need to be updated to use Azure Maps by the retirement date that applies to your Bing Maps for Enterprise account type. An Azure Maps Snap to Road API will be released soon.

Azure Maps is Microsoft's next-generation maps and geospatial services for developers. Azure Maps has many of the same features as Bing Maps for Enterprise, and more. To get started with Azure Maps, create a free Azure subscription and an Azure Maps account. For more information about azure Maps, see Azure Maps Documentation. For migration guidance, see Bing Maps Migration Overview.

As of 9/30/2024, the Bing Maps Snap Points to Roads service will no longer support access to truck speed limits and vehicle attributes. To avoid service disruptions, modify your application by 9/30/2024.

The response returned by the Snap to Road API contains either an SnapToRoadResponse resource or an RouteProxyAsyncStatus resource. The SnapToRoadResponse contains the snapped point data while the RouteProxyAsyncStatus contains status information about an asynchronous request that was made for an isochrone. The following tables provide the descriptions of the SnapToRoadResponse resource fields.

For more information about the common response syntax for the Bing Maps REST Services, see Common Response Description.

SnapToRoadResponse Resource

Represents a list of snapped or interpolated points returned by the Snap to Road API.

JSON XML Type Description
snappedPoints SnappedPoints SnappedPoint[] The array of points that have been snapped as well as any points added through interpolation.

SnappedPoint Class

Represents a snapped or interpolated point.

JSON XML Type Description
coordinate Coordinate Coordinate The coordinate in which a point was snapped to or an interpolated point.
index Index integer The index in the original list of points passed into the query that this snapped point corresponds to. Can be a value between -1 and the number of points – 1. The index will be set to -1 when the point is an interpolated point and not one of the snapped input points.
name Name string The name of the street this snapped point lies on, if available.
speedLimit SpeedLimit double? The posted speed limit. There are some special values which may be returned:

• Null – Speed limit not requested.
• 0 – Speed limit unavailable.
truckSpeedLimit TruckSpeedLimit double? The posted truck speed limit. There are some special values which may be returned:

• Null – Truck speed limit not requested.
• 0 – Truck speed limit unavailable, consider using standard speed limit.
• -1 - The road does not allow trucks.

See Also