Migration from previous major SDK versions
From versions 12.x to 13.х
For Full and Map versions
-
Styles must be exported again: fixed issues with displaying custom and immersive objects.
-
Updated all layers in the
Roadsgroup for displaying immersive roads in the main map mode. -
Added the
Traffic v13.0.0group for displaying new colors of tiles with traffic jams. -
Added the
Car route line v13.0.0group for displaying car routes on immersive roads. -
For thread isolation and compatibility with Swift 6, added the
@MainActorto the project and marked protocols, structures, and functions asSendable. -
Updated the minimum supported iOS version to 16.0.
-
Major changes in SwiftUI elements:
- Renamed the main map layer
MapViewOverlayto MapView and all methods for configuring the layer. - Renamed the
IMapFactory.mapViewOverlayproperty to IMapFactory.mapView. - Renamed the
IMapControlViewFactoryfactory of SwiftUI elements for map control to IMapViewsFactory. - Renamed methods of SwiftUI elements for creating road events to RoadEventCreatorView.
- Renamed methods of SwiftUI elements for configuring the display of road event information to RoadEventInfoView.
- Renamed custom SwiftUI markers and containers on the map
MapMarkerView,MapMarkerViewModel, andMapMarkerViewOverlayto MarkerView, MarkerViewModel, and MarkerOverlayView, respectively. - Renamed the
IMapFactory.mapMarkerViewOverlayproperty to IMapFactory.markerOverlayView. - Renamed the main navigator layer
NavigatorViewto NavigationView. - Renamed the
NavigatorView.navigatorViewFinishButtonCallback()method to NavigationView.finishButtonCallback(). - Renamed the
INavigatorViewFactoryfactory of SwiftUI elements for navigator control to INavigationViewFactory.
- Renamed the main map layer
-
Major changes in UIKit elements:
- Renamed the main map layer
IMapViewto IMapUIView. - Renamed the
IMapFactory.mapViewproperty to IMapFactory.mapUIView. - Renamed interfaces for the gesture processing layer
IMapGestureViewandIMapGestureViewFactoryto IMapGestureUIView and IMapGestureUIViewFactory, respectively. - Renamed the
IMapFactory.gestureViewproperty to IMapFactory.gestureUIView. - Renamed custom UIKit markers and containers on the map
IMarkerView,IMarkerViewFactory, andIMarkerViewOverlayto IMarkerUIView, IMarkerUIViewFactory, and IMarkerOverlayUIView, respectively. - Renamed the
IMapFactory.markerViewOverlayobject to IMapFactory.markerOverlayUIView. - Renamed the
IMapControlFactoryfactory of UIKit elements for map control to IMapUIControlsFactory. - Renamed all public classes for UIKit controls, models, and their factories. For example, renamed the
ZoomControlto ZoomUIControl,TrafficControlto TrafficUIControl, andIndoorControlto IndoorUIControl, etc. - Renamed the
RoadEventCardViewOptionsfactory of UIKit elements for road event cards to IRoadEventUIViewFactory. - Renamed the
IRoadEventCardViewobject to IRoadEventInfoUIView. - Renamed the
ICreateRoadEventViewobject to IRoadEventCreatorUIView. - Renamed the
RoadEventCardViewOptionsobject to RoadEventInfoViewOptions. - Renamed the main navigator layer
INavigationViewto INavigationUIView. - Renamed the
INavigationViewControlsFactoryfactory of UIKit elements for navigator control to INavigationUIControlsFactory. - Renamed the
INavigationMapControlsFactoryfactory of UIKit elements for map control to INavigationMapUIControlsFactory.
- Renamed the main map layer
-
Now, a single channel BaseCamera.changed is used to track camera state changes instead of separate channels for each property. Subscriptions are replaced, and additional filtering of change reasons is added.
-
Changed the method of creating some classes:
- Removed the
getSystemMemoryManagerfunction. To obtain an object for managing system memory, use the SystemMemoryManager.instance() method. - Removed the SearchHistory constructor. To obtain a search history object, use the SearchHistory.instance() method.
- Removed the RoadEventManager constructor. To obtain an object for working with road events, use the RoadEventManager.instance() method.
- Removed the
getHttpCacheManagerfunction. To obtain an object for managing the HTTP cache, use the HttpCacheManager.get() method. - Removed the
getLocaleManagerfunction. To obtain an object for managing application locales, use the LocaleManager.instance() method. - Removed the TrafficCollector constructor. To obtain an object for managing the service for traffic information collection, use the TrafficCollector.instance() method.
- Removed the
getAudioSettingsfunction. To obtain an object for managing application sound, use the AudioSettings.get() method. - Removed the
getPackageManagerfunction. To obtain an object for managing packages, use the PackageManager.instance() method. - Removed the
getTerritoryManagerfunction. To obtain an object for managing territories, use the TerritoryManager.instance() method. - Removed the
getTerritoriesAlongRouteProviderfunction. To obtain an object for extracting a list of territories along a route, use the TerritoriesAlongRouteProvider constructor. - Removed the
getVoiceManagerfunction. To obtain an object for managing voice packages, use the VoiceManager.instance() method.
- Removed the
-
Removed the
buildingLevelsproperty for obtaining floor plans from the DirectoryObject. -
The DirectoryObject.buildingInfo property is now optional.
-
The BuildingInfo.buildingId property is now mandatory and cannot be empty.
-
The LevelInfo.id property is now optional.
-
Changed the type of the PublicTransportDirectoryRouteInfo.color property from
Int?toColor?. -
The SearchQueryBuilder.setGeoPoint() method now accepts an optional value type.
-
The SearchQueryBuilder.setRadius() method now accepts an optional value type.
Additionally for Full version
- Removed the
getRoadMacroGraphfunction and theRoadMacroGraphclass. Now, to build offline routes between neighboring regions, download the required region packages. - Removed the class for configuring the position of the bubble with lanes on the route (
LanesCalloutMapPositionandRouteMapObject.lanesCalloutPositions) and the property from the RouteMapObject. - Renamed the
UIntRouteLongAttributeclass to DoubleRouteLongAttribute. - Changed the type of the Route.trafficLights property from VoidRouteAttribute to StringRouteAttribute.
- Added a new transport type
motorcycleto TransportType. - Added parameters for configuring the style zoom level to the SpeedRangeToStyleZoom constructor.
- Added the
rampDown,rampUp,smoothRampDown, andsmoothRampUpvalues for ramps to RoadSubtype. - Added new values of positions and landmarks to CarInstructionCrossroadLandmark.
- Added the
deepGreenandorangecolor values to TrafficSpeedColor. - Added the
crossingflag for displaying the start and end of a crossing on a route to RouteMapObjectDisplayFlag. - Added the
crossingnew type of a route point (the start and end of a crossing) to RoutePointKind. - Added values for event notifications
betterRoute("better route") andhumps(speed bumps) to SoundCategory.
From versions 10.x to 12.х
For Full and Map versions
- Styles must be exported again.
- To ensure proper display of the geolocation marker, copy corresponding layers.
- Removed the
Container.apiKeyOptionsparameter. You can now explicitly pass the key file source usingKeySource,KeyFromAsset,KeyFromFile,andKeyFromString. - Removed the
Container.vendorConfigFileparameter. You can now explicitly pass the configuration file source usingVendorConfig,VendorConfigFromAsset,VendorConfigFromFile, andVendorConfigFromString. - Removed
Container.makeStyleFactory(),Container.makeSearchManagerFactory(),Container.makeSourceFactory(),Container.makeImageFactory(), andContainer.makeLocaleManager()methods. Instead, useContainer.styleFactory,Container.searchManagerFactory,Container.sourceFactory,Container.imageFactory, andContainer.localeManagerfields. - Removed
IPositioningServicesFactoryand theContainer.positioningServices. When creating aContainer, passContainer.locationProviderandContainer.magneticHeadingProviderseparately. - Removed
ILocationService. Instead, useLocationServicewith similar functionality. - Removed
MyLocationControllerandMapLocationController.myLocationIndicatorController. To configure the marker geolocation source, use MyLocationControllerSettings. In the INavigationView, geolocation source is now not substituted. - Changed the HttpOptions structure while keeping its functionality.
- Renamed fields in LogOptions:
osLogLevelandcustomLogLevelare nowsystemLevelandcustomLevelcorrespondingly. - Renamed values in LogLevel:
disabledandfaultare nowoffandfatalcorrespondingly. - Removed the
CameraState.followPositionvalue. Instead, see the Camera.behaviour value. - Extended values for SuggestedType, SuggestorType, and ObjectType so that they now correspond to Places API results.
- Aligned MyLocationMapObjectMarkerType values with standard naming.
- Removed the
createRasterTileDataSourcemethod. Added a new source of raster tiles RasterTileSource, which enables setting transparency for raster tiles.
Additionally for Full version
- To ensure that immersive roads of actual width are displayed and other objects interact with them properly in the navigation mode, export latest Mobile SDK styles and apply your settings.
- Removed
AudioVolume. You can now set instructions volume from 0 to 100 using AudioSettings.volume. - Removed
AudioOptionsandIAudioSettings. UseAudioSettingsto configure sounds in the SDK. - RouteMapObjectDisplayFlag.immersiveRouteParts - flag to use immersive geometry on route parts.
From versions 7.x to 10.х
For Full and Map versions
-
Styles must be exported again.
-
Changed the process of working with FollowController:
- Removed
createRawMyLocationController()andcreateSmoothMyLocationController()methods. Added the MyLocationController constructor for creating controllers of geolocation marker movements. - Removed
FollowBearing.satelliteandFollowBearing.magneticvalues because now you do not need to specify the direction source. Added the FollowBearing.on value for enabling the following mode (the source is selected automatically). - Removed the
FollowPosition.tiltfield. Now you need to enable tilt following separately. Added a newtiltparameter to the CameraBehaviour constructor for tilt following. - Removed
FollowValue.satelliteBearing,FollowValue.magneticBearing, andFollowValue.accuracyvalues. Instead, added the FollowValue.bearing value with automatic selection of the source. - Removed
satelliteBearing(),magneticBearing(), andaccuracy()methods from the CustomFollowController interface. Added the CustomFollowController.bearing() method instead. - Removed
setClock(),satelliteBearing(),magneticBearing(), andaccuracy()methods from FollowController. AddedonAddedToMap(),onRemovedFromMap(), andbearing()methods instead. - Removed the
FollowController.nextTimestampChannelchannel. Added FollowController.changedChannel instead. - Changed the signature of the FollowController.updateValues() method.
- Removed the
PlatformLocationFollowControllercontroller. Instead, added BearingFollowController and CoordinatesFollowController controllers for following the map direction and map position coordinates, respectively. - Changed the constructor of the StyleZoomFollowController controller. Removed the
StyleZoomFollowController.setAnimationDurationmethod. - Changed the constructor of the TiltFollowController controller. Removed
TiltFollowController.setTilt()andTiltFollowController.setAnimationDuration()methods. - Replaced parameters of the FollowController.setThresholds() method with the typed ones.
- Removed the
FollowControllerClockclass. Changed the type of the FollowController.setClock() method parameter to timestamp. - Removed
TransitionType. The MyLocationControlModel constructor does not taketransitionTypenow. Removed thetransitionTypeparameter from the CameraBehaviour constructor. - Removed
MyLocationDirectionBehaviour. The MyLocationMapObjectSource constructor of a geolocation source does not takedirectionBehaviournow. Removed theMyLocationMapObjectSource.setDirectionBehaviour()method.
- Removed
-
Removed the BaseCamera.styleZoomToTiltRelation field.
-
Renamed the
MagneticHeadingProviderclass toHeadingProvider. -
Constructors of Circle, Marker, Polygon, and Polyline are labeled as
throws. -
Removed the MapOptions.mapRendererType option and the
MapRendererTypeenum. NowMetalis always enabled for map rendering. -
Removed
Circle.positionandCircle.radiussetters. Instead, added Circle.setPosition() and Circle.setRadius() methods that can throw exceptions. -
Updated the Locale structure: now it is created based on separate
languageandregionvalues. -
Removed PackageManager and Package from the SDK Map build. The product size has reduced.
Additionally for Full version
- Updated the Voice.playWelcome() method to return Future, which becomes ready when sample playing is finished.
- Removed the
RoadSubtype.stairwayfield. Instead, added RoadSubtype.stairwayUp and RoadSubtype.stairwayDown fields for using stairways with explicit direction. - Removed the
NavigationFollowController.mapTiltControllerfield. - Enabled throwing an exception when attempting to start the navigator in the guidance or simulation mode with a public transport route.
- Disabled caching of
FreeRoamtiles during navigation. - Updated MyLocationMapObjectSource for the navigator to be installed inside INavigationView.
From versions 5.x to 7.x
For Full and Map versions
- Styles must be exported again.
- Removed the
DgisSource.createOnlineDgisSource()andDgisSource.createOfflineDgisSource()methods. Instead, use theDgisSource.createDgisSource()method with the additionalDgisSourceWorkingModeparameter to set the map working mode. Four modes are available now:online,offline,hybridOnlineFirst, andhybridOfflineFirst. - The
FollowControllernow returnsStyleZoominstead ofZoom. - Renamed
FollowValue.zoomtoFollowValue.styleZoom. - Renamed
ZoomFollowControllertoStyleZoomFollowController. - Renamed
ZoomToTiltRelationtoStyleZoomToTiltRelation. - Renamed
SpeedRangeToZoomtoSpeedRangeToStyleZoom. - The
Projection.screenToMap()method now returns a null value instead of an exception if a point is located outside the map. - Removed the
BaseCamera.setPadding()method and theCameraPositionPointChangeBehaviourenum. Now theBaseCamera.paddingfield is a property. - Removed the
Camera.animatedMoveStarted()andCamera.animatedMoveFinished()methods. Instead, use theCamera.stateChannelchannel. - Labeled the
SearchManager.createOnlineManager(),SearchManager.createOfflineManager(), andSearchManager.createSmartManager()methods asthrows. - Removed the
BaseCamera.positionandBaseCamera.zoomRestrictionsproperties. Labeled theBaseCamera.setPosition,BaseCamera.setZoomRestrictions, andBaseCamera.setPositionPointmethods asthrows. - Removed the
Map.fontIconSizeMultiplierproperty. Labeled theMap.setFontIconSizeMultiplier()method asthrows. - Labeled the
NavigationManagerbuilder and theNavigationManager.start()andNavigationManager.startSimulation()methods asthrows. - Labeled the
Container.contextclass and all otherContainerfactory-methods asthrows.
Additionally for Full version
- Changed titles in the
ZoomFollowSettingsto better reflect their purpose. - Removed the
Model.applyBetterRoute()method. Instead, added theModel.betterRouteResponse()method and theBetterRouteResponseenum to work with alternative routes. - Removed the
State.freeRoamvalue. To determine if the navigator is in the free-drive mode, use theRouteInfo.routeBuildOptionsvalue (it must be empty).
From versions 4.x to 5.x
For Full and Map versions
-
Updated method signatures:
zoomOutToFit()now takes only camera and geometry.calcPosition()now takes screen area, tilt, and bearing, so that you do not need to preset a camera to calculate the position.
-
ZoomFollowControllerbuilder now takes theMapparameter. -
Removed the
showOsmCopyright()andosmCopyrightAnimationDuration ()methods from theMapViewclass.
Additionally for Full version
- Removed the redundant
RoutePositionclass. UseRoutePointinstead. - Removed
Model.cameraProgressChannel. Use theCameraNotifierinstead. - Changed the type of
Traffic.durationsfromSecondsRouteLongAttributetoMillisecondsRouteAttributeand increased value precision. - Changed the type of
Route.obstaclestoObstacleInfoRouteAttributeand added additional information.
From versions 2.x to 4.x
For Full and Map versions
- Contact 2GIS support service to get a new key to use the Mobile SDK. It is mandatory to specify the
appIdof the application for which the key will be created. The received key filedgissdk.keyeither should be added to the application root, or during Mobile SDK initialization the object of structureApiKeyOptionsshould be passed specifying the path to the file. - Removed the
APIKeysstructure Instead, inContainer.initthe first parameter must be passed the object of the structureApiKeyOptionswhich contains the path to the filedgissdk.key. The defaultApiKeyOptions.defaultobject tries to get the file from the root of the application. - Update styles.
- Renamed the
DirectoryObjectIdclass toDgisObjectId. - Removed
serializeanddeserializefunctions forCameraPosition. Instead, use the new serialization mechanismPackedMapState. - Removed methods
SearchQueryBuilder.setLocation()andSuggestQueryBuilder.setLocation(). Now the value is automatically taken from the geoposition source. - Removed the
PackedSearchQuery.location()method. - Removed
SearchResultMarkerObjectandSearchResultMarkerSourcefor generating search result tokens due to lack of ability to dynamically add or remove objects. As an alternative, you can implement marker generation or use clustering. - When creating
MyLocationMapObjectSourceby defaultSmoothMyLocationControlleris used instead ofRawMyLocationController.
Additionally for Full version
-
Removed lists with route information in
RouteInfo:cameras,instructions,laneSignsetc. Removed indexes of current itemsModel.cameraIndexChannelandModel.instructionIndexChannel. Instead, obtain the information directly from the route and the current position. For example, to obtain the nearest camera, use theModel.route.route.cameras.findNearForward(position). -
Renamed the route search parameters:
BicycleRouteSearchOptions.avoidUnderpassestoavoidUnderpassesAndOverpassesCarRouteSearchOptions.avoidFerrytoavoidFerriesTruckRouteSearchOptions actualWeight,maxPermissibleWeighttoactualMass,maxPermittedMass
-
The
RoadType.roadenum value is divided into subtypesRoadType.highway,RoadType.federalRoad, and others. -
Replaced the
VoiceSelector.setVoice()method with thevoiceproperty. -
Removed
Model.durationChannel,Model.routeDurationChannel. Instead, use theModel.dynamicRouteInfo.traffic.durations.calculateDuration(routePoint). -
Changed the set of the
RoadSurfaceenum values. -
Removed
Model.navigationActiveChannel,NavigationManager.uiSettings. Instead, use a new classActivityTrackerto get navigator activity.
From versions 1.x to 2.x
-
Instead of
Arcdegree, use separate typesBearing,Latitude, andLongitudefor setting camera rotation, latitude, and longitude. -
Changed API for working with traffic jams:
- Renamed the
TrafficScoretoTrafficScoreProvider. - Renamed the
TrafficScoreValuetoTrafficScore. - Removed the
TrafficManager. TrafficScoreProvideris now created through the constructor.
- Renamed the
-
Fixed a crash when
GLContextwas not created when creating a map. Now in case of an error, an exceptionGLContextErrorappears. -
Renamed the
LocaleManager.setOverridedLocales()method tooverrideLocales(). -
Removed getting the positioning queue via
IPositioningServicesFactory.positioningQueue. Now inside theILocationProviderprotocol implementation there is no need to callback through the queue. -
Fixed and changed the API for custom camera controllers. Now there can be only one controller. Use
Camera.setCustomFollowController()andCamera.removeCustomFollowController()methods for adding and removing controllers.