Breaking API changes in version 1.0
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.
Overview
One of the main motivations behind the SDK changes for V1 has been to provide a more stable API baseline for our customers. Another major motivation has been to unify our APIs and to get closer parity on all supported platforms.
In some cases, these challenges have meant making important but necessary breaking changes that clients can depend on going forward. Our own API cleanup efforts have been an important part of the process as well.
Most breaking changes are the result of one of the following:
- Making the overall API leaner.
- Fixing of APIs, notably some events that used to fire outside of the UI thread.
- Overhauling of some features like MapFlyout to make them friendlier and easier to use.
- Renaming of some APIs to better align them with the native platform and/or to conform with established naming conventions.
Android
Updated various public classes.
GeoboundingBox
- Now inherited from
Geoshape
. - Replaced field
north
with accessorgetNorth
. - Replaced field
east
with accessorgetEast
. - Replaced field
south
with accessorgetSouth
. - Replaced field
west
with accessorgetWest
. - Changed constructors to take
Geoposition
objects instead ofGeolocation
.
Geolocation
- Renamed
Geolocation
toGeopoint
. - Now inherited from
Geoshape
. - Replaced properties
latitude
,longitude
,altitude
with propertyposition
. - Moved property
altitudeReference
to base classGeoshape
; it is now read-only.
Geopath
- Now inherited from
Geoshape
. - Changed constructors to take
Geoposition
objects instead ofGeolocation
.
Geoshape
- Introduced as base class for following types:
GeoboundingBox
,Geopath
,Geopoint
. - Exposes read-only properties
geoshapeType
andaltitudeReferenceSystem
.
MapIcon
- Renamed property accessor:
getIsFlat
toisFlat
. - Renamed property accessor:
getMapFlyout
togetFlyout
. - Removed property:
flyoutVisible
. - Removed method:
addOnMapIconDragListeners
. - Removed method:
addOnMapIconDragStartListeners
. - Removed method:
addOnMapIconDragStopListeners
. - Removed method:
removeOnMapIconDragListeners
. - Removed method:
removeOnMapIconDragStartListeners
. - Removed method:
removeOnMapIconDragStopListeners
.
MapStyleSheet
- Changed return type for method
fromJson
: fromOptional<MapStyleSheet>
toMapStyleSheet
.
MapFlyout
- Complete API overhaul.
MapLocation.MatchCode
- Change to top-level enum; now
MapLocationMatchCode
.
MapLocationFinder.Status
- Change to top-level enum; now
MapLocationFinderStatus
.
MapLocationPoint.CalculationMethod
- Change to top-level enum; now
MapLocationPointCalculationMethod
.
MapLocationPoint.UsageType
- Change to top-level enum; now
MapLocationPointUsageType
.
MapPolygon
- Renamed property accessor:
getStrokeDashed
toisStrokeDashed
. - Replaced property
path
of typeGeopath
withpaths
of typeList<Geopath>
.
MapPolyline
- Renamed property accessor:
getStrokeDashed
toisStrokeDashed
.
MapUserInterfaceOptions
- Renamed property accessor:
isPanGesturesEnabled
toisPanGestureEnabled
. - Renamed property accessor:
isRotateGesturesEnabled
toisRotateGestureEnabled
. - Renamed property accessor:
isTiltGesturesEnabled
toisTiltGestureEnabled
. - Renamed property accessor:
isZoomGesturesEnabled
toisZoomGestureEnabled
. - Removed property:
myLocationButtonVisible
.
MapView
- Renamed method:
resume
toonResume
. - Renamed method:
suspend
toonPause
. - Renamed method:
close
toonDestroy
. - Renamed property accessor:
getBuildingsVisible
toisBuildingsVisible
. - Renamed property accessor:
getBusinessLandmarksVisible
toisBusinessLandmarksVisible
. - Renamed property accessor:
getTransitFeaturesVisible
toisTransitFeaturesVisible
. - Changed return type for method
getLocationFromOffset
: fromOptional<Geolocation>
toGeolocation
. - Changed return type for method
getOffsetFromLocation
: fromOptional<Point>
toPoint
. - Removed method:
clear
. - Removed property:
userLocationTrackingMode
. - Removed property:
userLocationVisible
.
OnMapIconDragListener
- Removed.
OnMapIconDragStartListener
- Removed.
OnMapIconDragStopListener
- Removed.
Optional<T>
- Removed.
iOS
Updated various public interfaces, as well as universal and various individual headers.
MSGeoboundingBox
- Now inherited from
MSGeoshape
. - Renamed method:
geoboundingBoxWithNorthwest:southwest:
togeoboundingBoxWithNorthwestCorner:southwestCorner:
. - Changed constructors to take
MSGeoposition
objects instead ofMSGeolocation
.
MSGeolocation
- Renamed
MSGeolocation
toMSGeopoint
. - Now inherited from
MSGeoshape
. - Replaced properties
latitude
,longitude
,altitude
with propertyposition
. - Moved property
altitudeReference
to base classMSGeoshape
; it is now read-only.
MSGeopath
- Now inherited from
MSGeoshape
. - Changed constructors to take
MSGeoposition
objects instead ofMSGeolocation
.
MSGeoshape
- Introduced as base class for following types:
MSGeoboundingBox
,MSGeopath
,MSGeopoint
. - Exposes read-only properties
geoshapeType
andaltitudeReferenceSystem
.
MSMapElement
- Renamed property:
isVisible
tovisible
.
MSMapGroundOverlayMapLayer
- Changed
initWithImage:geoBoundingBox:
method signature toinitWithImage:boundingBox:
.
MSMapIcon
- Renamed property:
isFlat
toflat
.
MSMapFlyout
- Complete API overhaul.
MSMapLayer
- Renamed property:
isVisible
tovisible
.
MSMapPolygon
- Replaced property
path
of typeMSGeopath*
withpaths
of typeNSArray<MSGeopath*>*
.
MSMapUserInterfaceOptions
- Renamed property:
isPanGesturesEnabled
topanGestureEnabled
. - Renamed property:
isRotateGesturesEnabled
torotateGestureEnabled
. - Renamed property:
isTiltGesturesEnabled
totiltGestureEnabled
. - Renamed property:
isZoomGesturesEnabled
tozoomGestureEnabled
. - Renamed property:
isCompassButtonVisible
tocompassButtonVisible
. - Renamed property:
isZoomButtonsVisible
tozoomButtonsVisible
. - Renamed property:
isTiltButtonVisible
totiltButtonVisible
. - Removed property:
isMyLocationButtonVisible
. - Changed property:
(BOOL)isCopyrightVisible
to(MSCopyrightDisplay)copyrightDisplay
.
MSMapView
- Removed property:
userLocationTrackingMode
. - Removed property:
userLocationVisible
.