Partager via


GetBoundaryRequestOptions Object

Note

Bing Maps Web Control SDK retirement

Bing Maps Web Control SDK is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps Web Control SDK until June 30th, 2025. Enterprise account customers can continue to use Bing Maps Web Control SDK until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps Web Control SDK will need to be updated to use Azure Maps Web SDK by the retirement date that applies to your Bing Maps for Enterprise account type. For detailed migration guidance, see Migrate from Bing Maps Web Control SDK and Migrate Bing Maps Enterprise applications to Azure Maps with GitHub Copilot.

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.

Represents the options for requests boundary data from the GeoData API in the Bing Spatial Data Services.

Properties

Name Type Description
lod number The level of detail for the boundary polygons returned. An integer between 0 and 3, where 0 specifies the coarsest level of boundary detail and 3 specifies the best. Default: 0
entityType string The entity type to return. Default: CountryRegion

Supported entity types:

  • AdminDivision1: First administrative level within the country/region level, such as a state or a province.
  • AdminDivision2: Second administrative level within the country/region level, such as a county.
  • CountryRegion: Country or region.
  • Neighborhood: A section of a populated place that is typically well-known, but often with indistinct boundaries.
  • PopulatedPlace: A concentrated area of human settlement, such as a city, town or village.
  • Postcode1: The smallest post code category, such as a zip code.
  • Postcode2: The next largest post code category after Postcode1 that is created by aggregating Postcode1 areas.
  • Postcode3: The next largest post code category after Postcode2 that is created by aggregating Postcode2 areas.
  • Postcode4: The next largest post code category after Postcode3 that is created by aggregating Postcode3 areas.

Note: Not all entity types are available in all areas.
culture string Specifies the preferred language to use for any metadata text about the entity or polygons. Defaults to the culture used by the map control, which usually automatically detected based on user's browser settings. Setting this property will override the default value.
getAllPolygons boolean Specifies whether the response should include all of the boundary polygons for the requested entity or just return a single polygon that represents the main outline of the entity. Default: false
getEntityMetadata boolean Specifies whether the response should include metadata about the entity, such as AreaSqKm and others. Default: false
userRegion string Specifies the user’s home country or region. Defaults to the region setting of the user who loads the map.

Warning: Setting this property will override the default value, which is the region the user is actually in, and will allow the user to see boundaries which may not align with the views of their region. This could result in geopolitically sensitive borders being returned.

Note

Some boundaries consist of multiple polygons. By default, only the first polygon will be returned. Set the getAllPolygons property to true to have all the polygons that make up the boundary returned.