共用方式為


Base URL Structure

Note

Bing Maps for Enterprise service retirement

Bing Maps for Enterprise is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps for Enterprise services until June 30th, 2025. Enterprise account customers can continue to use Bing Maps for Enterprise services until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps for Enterprise REST APIs and SDKs will need to be updated to use Azure Maps by the retirement date that applies to your Bing Maps for Enterprise account type.

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.

The Bing Maps REST Services are all called by using the following base formats.

HTTP protocol

http://dev.virtualearth.net/REST/version/restApi/resourcePath?queryParameters&key={BingMapsKey}  

HTTPS protocol

https://dev.virtualearth.net/REST/version/restApi/resourcePath?queryParameters&key={BingMapsKey}  

Template Parameters

Note

All parameters in the Bing Maps REST Services are not case-sensitive.

URL parameter Alias Description Values
version v + API version number) Required. The version of the Bing Maps REST Services that you want to use. A string containing v and an integer that specifies the version of the Bing Maps REST Services.

Example: v1.
restApi Required. The REST API that you want to use. A part of the URL path that identifies the REST API.

Example: Imagery/Map
resourcePath Optional. Additional parameters that define a resource A part of the URL path that specifies a resource, such as an address or landmark.

Example: BirdsEye/51.5063249319792,-0.127144753932953
key Required. The Bing Maps Key to use for the request. A Bing Maps Key obtained from the Bing Maps Account Center

Example: key=A3sbe47EeFWsSlklbe Note: Although it is described separately in this table because of its importance, the Bing Maps Key is a query parameter.
queryParameters Optional with exceptions. One or more parameters and values that define the request. Depending on the request, query parameters may be optional or required. Query parameters consist of global parameters and parameters that are specific to each REST API. The Bing Maps Key is a required query parameter.

Example: userLocation=49.1231,-98.231
errorDetail ed Optional. Specifies whether the response should include error-codes along with the error text. Use with one of the following values.

- true
- false [default]

When this property is provided, response includes an error code along with a description for failed requests:

- errorCode: "NoSolution"
- errorDetails: "No route was found for the waypoints provided."

Example

The following example request specifies to use version one (v1) of the Bing Maps REST Services to find location information for the city of Seattle. The information will be returned in an XML format.

http://dev.virtualearth.net/REST/v1/Locations?q=seattle&output=xml&key={BingMapsKey}