Skip to main content

Migration from previous major SDK versions

From versions 12.x to 13.x

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 RAMP_DOWN, RAMP_UP, SMOOTH_RAMP_DOWN, and SMOOTH_RAMP_UP values for ramps to RoadSubtype.
  • Added new values of positions and landmarks to CarInstructionCrossroadLandmark.
  • Added the DEEP_GREEN 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 BETTER_ROUTE ("better route") and HUMPS (speed bumps) to SoundCategory.

From versions 10.x to 12.x

For Full and Map versions

  • Styles must be exported again.
  • To ensure proper display of the geolocation marker, copy corresponding layers.
  • Moved KeySource, KeyFromAsset, KeyFromFile, and KeyFromString to ru.dgis.sdk.platform.
  • Moved VendorConfig, VendorConfigFromAsset, VendorConfigFromFile, and VendorConfigFromString to ru.dgis.sdk.platform.
  • Moved LogOptions, LogLevel, LogMessage, and LogSink to ru.dgis.sdk.platform.
  • Moved HttpOptions, Certificate, CertificateFromAsset, CertificateFromFile, SystemCertificate, and HttpProxyOptions to ru.dgis.sdk.platform.
  • Removed MyLocationController and MapLocationController.myLocationIndicatorController. To configure the geolocation marker source, use MyLocationControllerSettings. In NavigationView, the geolocation source is now no longer substituted.
  • Added the GEO_POSITION value to EventsProcessingSettings.rotationCenter and EventsProcessingSettings.scalingCenter to set the gesture operation mode relative to the geolocation. To set the position, relatively to which the gesture will work, use the GestureManager.setTargetGeoPoint method.
  • Moved Meter from ru.dgis.sdk.map to ru.dgis.sdk.
  • Removed the CameraState.FOLLOW_POSITION value. Instead, see the Camera.behaviour value.
  • Extended values for SuggestedType, SuggestorType, and ObjectType so that they now correspond to Places API results.
  • 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 the latest Mobile SDK styles and apply your settings.
  • Removed AudioVolume. You can now set instructions volume from 0 to 100 using AudioSettings.volume.
  • RouteMapObjectDisplayFlag.IMMERSIVE_ROUTE_PARTS - flag to use immersive geometry on route parts.

From versions 7.x to 10.x

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.SATELLITE_BEARING, FollowValue.MAGNETIC_BEARING, 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 CameraBehaviour.transitionType field. 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.

  • Updated the LocaleManager.overrideLocales() method to take a list of structures Locale with separate language and region fields.

  • Removed PackageManager and Package from the SDK Map build. The product size has reduced.

  • Removed lightTheme and darkTheme fields from MapOptions. To set the theme, use the MapTheme class in MapOptions.setTheme() and MapView.setTheme() methods.

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.STAIRWAY_UP and RoadSubtype.STAIRWAY_DOWN 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 NavigationView.

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, HYBRID_ONLINE_FIRST, and HYBRID_OFFLINE_FIRST.
  • The FollowController now returns StyleZoom instead of Zoom.
  • Renamed FollowValue.ZOOM to FollowValue.STYLE_ZOOM.
  • 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() and BaseCamera.setPositionPoint() methods. Removed the CameraPositionPointChangeBehaviour enum. Now the BaseCamera.padding and BaseCamera.positionPoint fields are properties.
  • Removed the Camera.animatedMoveStarted() and Camera.animatedMoveFinished() methods. Instead, use the Camera.stateChannel channel.
  • Renamed the IndoorControlModel.levelNames and IndoorControlModel.activeLevelIndex channels to IndoorControlModel.levelNamesChannel and IndoorControlModel.activeLevelIndexChannel respectively. Removed the IndoorControlModel.onLevelClicked() method. Renamed the IndoorControlModel.isMarkedLevel() method to IndoorControlModel.isLevelMarked().

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.FREE_ROAM 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() method 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 must be added to assets.
  • Removed the ApiKeys structure and the corresponding parameter in DGis.initialize.
  • 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.FEDERAL_ROAD, 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.
  • Renamed the LocaleManager.setOverridedLocales() method to overrideLocales().

  • Moved the ScreenSize class from ru.dgis.map to ru.dgis.common.

  • Instead of the HttpOptions.userSslCerts and HttpOptions.disableSystemSslCerts properties, use the HttpOptions.certificates property for setting a list of certificates.

  • 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.