Jaa


Geopoint 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 geographic point.

Android

public class Geopoint extends Geoshape

iOS

@interface MSGeopoint : MSGeoshape

Constructor

Android

// Create Geopoint with the specified Geoposition and altitude reference system.
Geopoint(Geoposition position)

// Create Geopoint with the specified Geoposition.
Geopoint(Geoposition position, AltitudeReferenceSystem altitudeReference)

// Creates a Geopoint with the specified latitude and longitude in degrees, with the default altitude of 0 and altitude reference of surface.
Geopoint(double latitude, double longitude)

// Creates a Geopoint with the specified latitude and longitude in degrees and altitude in meters, with the default altitude reference of surface.
Geopoint(double latitude, double longitude, double altitude)

// Creates a Geopoint with the specified latitude and longitude in degrees, altitude in meters, and altitude reference system.
Geopoint(double latitude, double longitude, double altitude, AltitudeReferenceSystem altitudeReference)

// Creates a Geopoint from Android's Location object.
Geopoint(android.location.Location location)

See also: android.location.Location

iOS

+ (instancetype)geopointWithLocation:(CLLocation *)location

+ (instancetype)geopointWithPosition:(MSGeoposition *)position

+ (instancetype)geopointWithPosition:(MSGeoposition *)position
             altitudeReferenceSystem:(MSMapAltitudeReferenceSystem)altitudeReferenceSystem

+ (instancetype)geopointWithLatitude:(CLLocationDegrees)latitude
                           longitude:(CLLocationDegrees)longitude

+ (instancetype)geopointWithLatitude:(CLLocationDegrees)latitude
                           longitude:(CLLocationDegrees)longitude
                            altitude:(CLLocationDistance)altitude

+ (instancetype)geopointWithLatitude:(CLLocationDegrees)latitude
                           longitude:(CLLocationDegrees)longitude
                            altitude:(CLLocationDistance)altitude
             altitudeReferenceSystem:(MSMapAltitudeReferenceSystem)altitudeReferenceSystem

Static Methods

InitWithLatitude (iOS Only)

Creates MSGeopoint object with a specific latitude, longitude, altitude, and altitude reference system.

- (instancetype)initWithLatitude:(CLLocationDegrees)latitude
                       longitude:(CLLocationDegrees)longitude
                        altitude:(CLLocationDistance)altitude
         altitudeReferenceSystem:(MSMapAltitudeReferenceSystem)altitudeReferenceSystem

InitWithPostition (iOS Only)

Creates MSGeopoint object with a position and altitude reference system.

- (instancetype)initWithPosition:(MSGeoposition *)position
         altitudeReferenceSystem:(MSMapAltitudeReferenceSystem)altitudeReferenceSystem

Properties

Position

Gets the position of the geographic location.

Android

Geoposition getPosition()

iOS

@property (nonatomic) MSGeoposition *position

AltitudeReferenceSystem

Gets the altitude reference system used to describe this location.

Android

AltitudeReferenceSystem getAltitudeReferenceSystem()  

iOS

@property (nonatomic, readonly) MSMapAltitudeReferenceSystem altitudeReferenceSystem

See also: AltitudeReferenceSystem

Methods

ToAltitudeReferenceSystem

Returns a location in a new altitude reference system. This method leverages a passed-in MapView for retrieving data for conversions.

Android

Geopoint toAltitudeReferenceSystem(AltitudeReferenceSystem newAltitudeReferenceSystem, MapView mapView)

iOS

- (MSGeopoint *)toAltitudeReferenceSystem:(MSMapAltitudeReferenceSystem)newAltitudeReferenceSystem
                                      map:(MSMapView *)map

See Also