Aracılığıyla paylaş


GeoboundingBox Class

Note

Bing Maps SDK for Android and iOS retirement

Bing Maps SDK for Android and iOS is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps SDK for Android and iOS until June 30th, 2025. Enterprise account customers can continue to use Bing Maps SDK for Android and iOS until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps SDK for Android and iOS 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.

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 a bounded geographic area.

Android

public class GeoboundingBox extends Geoshape

iOS

@interface MSGeoboundingBox : MSGeoshape

Constructors

See also: MSGeoposition

Android

// Creates a bounding box based on two opposite corners. 
GeoboundingBox(Geoposition northwestCorner, Geoposition southeastCorner)
// Creates a bounding box based on two opposite corners and specified altitude reference system. 
GeoboundingBox(Geoposition northwestCorner, Geoposition southeastCorner, AltitudeReferenceSystem altitudeReferenceSystem)
// Creates a bounding box to contain the specified positions. Positions must contain at least 1 element.
GeoboundingBox(List<Geoposition> positions)
// Creates a bounding box to contain the specified positions and altitude reference system. Positions must contain at least 1 element.
GeoboundingBox(List<Geoposition> positions, AltitudeReferenceSystem altitudeReferenceSystem)

iOS

+ (instancetype)geoboundingBoxWithNorthwestCorner:(MSGeoposition *)northwestCorner southeastCorner:(MSGeoposition *)southeastCorner
+ (instancetype)geoboundingBoxWithNorthwestCorner:(MSGeoposition *)northwestCorner southeastCorner:(MSGeoposition *)southeastCorner altitudeReferenceSystem:(MSMapAltitudeReferenceSystem altitudeReferenceSystem
+ (instancetype)geoboundingBoxWithPositions:(NSArray<MSGeoposition *> *)positions
+ (instancetype)geoboundingBoxWithPositions:(NSArray<MSGeoposition *> *)positions altitudeReferenceSystem:(MSMapAltitudeReferenceSystem)altitudeReferenceSystem

Properties

North

The latitude of the northern border of the bounding box.

Android

double getNorth()

iOS

@property (nonatomic, readonly) CLLocationDegrees north

East

The longitude of the eastern border of the bounding box.

Android

double getEast()

iOS

@property (nonatomic, readonly) CLLocationDegrees east

South

The latitude of the southern border of the bounding box.

Android

double getSouth()

iOS

@property (nonatomic, readonly) CLLocationDegrees south

West

The longitude of the western border of the bounding box.

Android

double getWest()

iOS

@property (nonatomic, readonly) CLLocationDegrees west

MinimumAltitude

The minimum altitude of all the points within the bounding box.

Android

double getMinimumAltitude()

iOS

@property (nonatomic, readonly) CLLocationDistance minimumAltitude

MaximumAltitude

Gets the maximum altitude of all the points within the bounding box.

Android

double getMaximumAltitude()

iOS

@property (nonatomic, readonly) CLLocationDistance maximumAltitude

AltitudeReferenceSystem

Gets the altitude reference system used by the GeoboundingBox.

Android

AltitudeReferenceSystem getAltitudeReferenceSystem()

iOS

@property (nonatomic, readonly) MSMapAltitudeReferenceSystem altitudeReferenceSystem

See also: AltitudeReferenceSystem

NorthwestCorner

The north west corner of the bounding box. See also: Geoposition

Android

Geoposition getNorthwestCorner()

iOS

@property (nonatomic, readonly) Geoposition *northWestCorner

SoutheastCorner

The south east corner of the bounding box. See also: Geoposition

Android

Geoposition getSoutheastCorner()

iOS

@property (nonatomic, readonly) Geoposition *southEastCorner

See Also