Skip to main content

Migration from previous major SDK versions

From versions 12.x to 13.х

For Full and Map versions

Additionally for Full version

  • Removed the getRoadMacroGraph function and the RoadMacroGraph class. 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 (LanesCalloutMapPosition and RouteMapObject.lanesCalloutPositions) and the property from the RouteMapObject.
  • Renamed the UIntRouteLongAttribute class to DoubleRouteLongAttribute.
  • Changed the type of the Route.trafficLights property from VoidRouteAttribute to StringRouteAttribute.
  • Added a new transport type motorcycle to TransportType.
  • Added parameters for configuring the style zoom level to the SpeedRangeToStyleZoom constructor.
  • Added the rampDown, rampUp, smoothRampDown, and smoothRampUp values for ramps to RoadSubtype.
  • Added new values of positions and landmarks to CarInstructionCrossroadLandmark.
  • Added the deepGreen and orange color values to TrafficSpeedColor.
  • Added the crossing flag for displaying the start and end of a crossing on a route to RouteMapObjectDisplayFlag.
  • Added the crossing new type of a route point (the start and end of a crossing) to RoutePointKind.
  • Added values for event notifications betterRoute ("better route") and humps (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.apiKeyOptions parameter. You can now explicitly pass the key file source using KeySource, KeyFromAsset, KeyFromFile,and KeyFromString.
  • Removed the Container.vendorConfigFile parameter. You can now explicitly pass the configuration file source using VendorConfig, VendorConfigFromAsset, VendorConfigFromFile, and VendorConfigFromString.
  • Removed Container.makeStyleFactory(), Container.makeSearchManagerFactory(), Container.makeSourceFactory(), Container.makeImageFactory(), and Container.makeLocaleManager() methods. Instead, use Container.styleFactory, Container.searchManagerFactory, Container.sourceFactory, Container.imageFactory, and Container.localeManager fields.
  • Removed IPositioningServicesFactory and the Container.positioningServices. When creating a Container, pass Container.locationProvider and Container.magneticHeadingProvider separately.
  • Removed ILocationService. Instead, use LocationService with similar functionality.
  • Removed MyLocationController and MapLocationController.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: osLogLevel and customLogLevel are now systemLevel and customLevel correspondingly.
  • Renamed values in LogLevel: disabled and fault are now off and fatal correspondingly.
  • Removed the CameraState.followPosition value. 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 createRasterTileDataSource method. 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 AudioOptions and IAudioSettings. Use AudioSettings to 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() and createSmoothMyLocationController() methods. Added the MyLocationController constructor for creating controllers of geolocation marker movements.
    • Removed FollowBearing.satellite and FollowBearing.magnetic values 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.tilt field. Now you need to enable tilt following separately. Added a new tilt parameter to the CameraBehaviour constructor for tilt following.
    • Removed FollowValue.satelliteBearing, FollowValue.magneticBearing, and FollowValue.accuracy values. Instead, added the FollowValue.bearing value with automatic selection of the source.
    • Removed satelliteBearing(), magneticBearing(), and accuracy() methods from the CustomFollowController interface. Added the CustomFollowController.bearing() method instead.
    • Removed setClock(), satelliteBearing(), magneticBearing(), and accuracy() methods from FollowController. Added onAddedToMap(), onRemovedFromMap(), and bearing() methods instead.
    • Removed the FollowController.nextTimestampChannel channel. Added FollowController.changedChannel instead.
    • Changed the signature of the FollowController.updateValues() method.
    • Removed the PlatformLocationFollowController controller. 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.setAnimationDuration method.
    • Changed the constructor of the TiltFollowController controller. Removed TiltFollowController.setTilt() and TiltFollowController.setAnimationDuration() methods.
    • Replaced parameters of the FollowController.setThresholds() method with the typed ones.
    • Removed the FollowControllerClock class. Changed the type of the FollowController.setClock() method parameter to timestamp.
    • Removed TransitionType. The MyLocationControlModel constructor does not take transitionType now. Removed the transitionType parameter from the CameraBehaviour constructor.
    • Removed MyLocationDirectionBehaviour. The MyLocationMapObjectSource constructor of a geolocation source does not take directionBehaviour now. Removed the MyLocationMapObjectSource.setDirectionBehaviour() method.
  • Removed the BaseCamera.styleZoomToTiltRelation field.

  • Renamed the MagneticHeadingProvider class to HeadingProvider.

  • Constructors of Circle, Marker, Polygon, and Polyline are labeled as throws.

  • Removed the MapOptions.mapRendererType option and the MapRendererType enum. Now Metal is always enabled for map rendering.

  • Removed Circle.position and Circle.radius setters. Instead, added Circle.setPosition() and Circle.setRadius() methods that can throw exceptions.

  • Updated the Locale structure: now it is created based on separate language and region values.

  • 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.stairway field. Instead, added RoadSubtype.stairwayUp and RoadSubtype.stairwayDown fields for using stairways with explicit direction.
  • Removed the NavigationFollowController.mapTiltController field.
  • Enabled throwing an exception when attempting to start the navigator in the guidance or simulation mode with a public transport route.
  • Disabled caching of FreeRoam tiles 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() and DgisSource.createOfflineDgisSource() methods. Instead, use the DgisSource.createDgisSource() method with the additional DgisSourceWorkingMode parameter to set the map working mode. Four modes are available now: online, offline, hybridOnlineFirst, and hybridOfflineFirst.
  • The FollowController now returns StyleZoom instead of Zoom.
  • Renamed FollowValue.zoom to FollowValue.styleZoom.
  • Renamed ZoomFollowController to StyleZoomFollowController.
  • Renamed ZoomToTiltRelation to StyleZoomToTiltRelation.
  • Renamed SpeedRangeToZoom to SpeedRangeToStyleZoom.
  • 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 the CameraPositionPointChangeBehaviour enum. Now the BaseCamera.padding field is a property.
  • Removed the Camera.animatedMoveStarted() and Camera.animatedMoveFinished() methods. Instead, use the Camera.stateChannel channel.
  • Labeled the SearchManager.createOnlineManager(), SearchManager.createOfflineManager(), and SearchManager.createSmartManager() methods as throws.
  • Removed the BaseCamera.position and BaseCamera.zoomRestrictions properties. Labeled the BaseCamera.setPosition, BaseCamera.setZoomRestrictions, and BaseCamera.setPositionPoint methods as throws.
  • Removed the Map.fontIconSizeMultiplier property. Labeled the Map.setFontIconSizeMultiplier() method as throws.
  • Labeled the NavigationManager builder and the NavigationManager.start() and NavigationManager.startSimulation() methods as throws.
  • Labeled the Container.context class and all other Container factory-methods as throws.

Additionally for Full version

  • Changed titles in the ZoomFollowSettings to better reflect their purpose.
  • Removed the Model.applyBetterRoute() method. Instead, added the Model.betterRouteResponse() method and the BetterRouteResponse enum to work with alternative routes.
  • Removed the State.freeRoam value. To determine if the navigator is in the free-drive mode, use the RouteInfo.routeBuildOptions value (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.
  • ZoomFollowController builder now takes the Map parameter.

  • Removed the showOsmCopyright() and osmCopyrightAnimationDuration () methods from the MapView class.

Additionally for Full version

  • Removed the redundant RoutePosition class. Use RoutePoint instead.
  • Removed Model.cameraProgressChannel. Use the CameraNotifier instead.
  • Changed the type of Traffic.durations from SecondsRouteLongAttribute to MillisecondsRouteAttribute and increased value precision.
  • Changed the type of Route.obstacles to ObstacleInfoRouteAttribute and 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 appId of the application for which the key will be created. The received key file dgissdk.key either should be added to the application root, or during Mobile SDK initialization the object of structure ApiKeyOptions should be passed specifying the path to the file.
  • Removed the APIKeys structure Instead, in Container.init the first parameter must be passed the object of the structure ApiKeyOptions which contains the path to the file dgissdk.key. The default ApiKeyOptions.default object tries to get the file from the root of the application.
  • Update styles.
  • Renamed the DirectoryObjectId class to DgisObjectId.
  • Removed serialize and deserialize functions for CameraPosition. Instead, use the new serialization mechanism PackedMapState.
  • Removed methods SearchQueryBuilder.setLocation() and SuggestQueryBuilder.setLocation(). Now the value is automatically taken from the geoposition source.
  • Removed the PackedSearchQuery.location() method.
  • Removed SearchResultMarkerObject and SearchResultMarkerSource for 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 MyLocationMapObjectSource by default SmoothMyLocationController is used instead of RawMyLocationController.

Additionally for Full version

  • Removed lists with route information in RouteInfo: cameras, instructions, laneSigns etc. Removed indexes of current items Model.cameraIndexChannel and Model.instructionIndexChannel. Instead, obtain the information directly from the route and the current position. For example, to obtain the nearest camera, use the Model.route.route.cameras.findNearForward(position).

  • Renamed the route search parameters:

    • BicycleRouteSearchOptions.avoidUnderpasses to avoidUnderpassesAndOverpasses
    • CarRouteSearchOptions.avoidFerry to avoidFerries
    • TruckRouteSearchOptions actualWeight, maxPermissibleWeight to actualMass, maxPermittedMass
  • The RoadType.road enum value is divided into subtypes RoadType.highway, RoadType.federalRoad, and others.

  • Replaced the VoiceSelector.setVoice() method with the voice property.

  • Removed Model.durationChannel, Model.routeDurationChannel. Instead, use the Model.dynamicRouteInfo.traffic.durations.calculateDuration(routePoint).

  • Changed the set of the RoadSurface enum values.

  • Removed Model.navigationActiveChannel, NavigationManager.uiSettings. Instead, use a new class ActivityTracker to get navigator activity.

From versions 1.x to 2.x

  • Instead of Arcdegree, use separate types Bearing, Latitude, and Longitude for setting camera rotation, latitude, and longitude.

  • Changed API for working with traffic jams:

    • Renamed the TrafficScore to TrafficScoreProvider.
    • Renamed the TrafficScoreValue to TrafficScore.
    • Removed the TrafficManager.
    • TrafficScoreProvider is now created through the constructor.
  • Fixed a crash when GLContext was not created when creating a map. Now in case of an error, an exception GLContextError appears.

  • Renamed the LocaleManager.setOverridedLocales() method to overrideLocales().

  • Removed getting the positioning queue via IPositioningServicesFactory.positioningQueue. Now inside the ILocationProvider protocol 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() and Camera.removeCustomFollowController() methods for adding and removing controllers.