Migration from previous major SDK versions
From versions 12.x to 13.x
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. -
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
EventsProcessingSettingsclass. -
Renamed the
Gestureobject to TransformGesture. -
Renamed the
ScalingSettingsobject to ScalingRecognizeSettings. -
Renamed the
RotationSettingsobject to RotationRecognizeSettings. -
Renamed the
MultiTouchShiftSettingsobject to MultiTouchRecognizeSettings. -
Renamed the
TiltSettingsobject to TiltRecognizeSettings. -
GestureManager.scalingSettings, GestureManager.rotationSettings, GestureManager.multitouchShiftSettings, and GestureManager.tiltSettings now return objects with ScalingGestureSettings, RotationGestureSettings, MultiTouchGestureSettings, and TiltGestureSettings types, respectively.
-
Moved the Color class for representing colors from the
ru.dgis.sdk.mappackage. -
Moved the ScreenDistance class from the
ru.dgis.sdk.mappackage. -
Moved the ScreenPoint class from the
ru.dgis.sdk.mappackage. -
Moved the ScreenShift class from the
ru.dgis.sdk.mappackage. -
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
RAMP_DOWN,RAMP_UP,SMOOTH_RAMP_DOWN, andSMOOTH_RAMP_UPvalues for ramps to RoadSubtype. - Added new values of positions and landmarks to CarInstructionCrossroadLandmark.
- Added the
DEEP_GREENandORANGEcolor 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
BETTER_ROUTE("better route") andHUMPS(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, andKeyFromStringtoru.dgis.sdk.platform. - Moved
VendorConfig,VendorConfigFromAsset,VendorConfigFromFile, andVendorConfigFromStringtoru.dgis.sdk.platform. - Moved
LogOptions,LogLevel,LogMessage, andLogSinktoru.dgis.sdk.platform. - Moved
HttpOptions,Certificate,CertificateFromAsset,CertificateFromFile,SystemCertificate, andHttpProxyOptionstoru.dgis.sdk.platform. - Removed
MyLocationControllerandMapLocationController.myLocationIndicatorController. To configure the geolocation marker source, use MyLocationControllerSettings. In NavigationView, the geolocation source is now no longer substituted. - Added the
GEO_POSITIONvalue 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.maptoru.dgis.sdk. - Removed the
CameraState.FOLLOW_POSITIONvalue. Instead, see the Camera.behaviour value. - Extended values for SuggestedType, SuggestorType, and ObjectType so that they now correspond to Places API results.
- 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 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()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.SATELLITE_BEARING,FollowValue.MAGNETIC_BEARING, 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 theCameraBehaviour.transitionTypefield. 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.styleZoomToTiltRelationfield. -
Renamed the
MagneticHeadingProviderclass toHeadingProvider. -
Updated the LocaleManager.overrideLocales() method to take a list of structures
Localewith separatelanguageandregionfields. -
Removed PackageManager and Package from the SDK Map build. The product size has reduced.
-
Removed
lightThemeanddarkThemefields 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.STAIRWAYfield. Instead, added RoadSubtype.STAIRWAY_UP and RoadSubtype.STAIRWAY_DOWN 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 NavigationView.
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,HYBRID_ONLINE_FIRST, andHYBRID_OFFLINE_FIRST. - The
FollowControllernow returnsStyleZoominstead ofZoom. - Renamed
FollowValue.ZOOMtoFollowValue.STYLE_ZOOM. - 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()andBaseCamera.setPositionPoint()methods. Removed theCameraPositionPointChangeBehaviourenum. Now theBaseCamera.paddingandBaseCamera.positionPointfields are properties. - Removed the
Camera.animatedMoveStarted()andCamera.animatedMoveFinished()methods. Instead, use theCamera.stateChannelchannel. - Renamed the
IndoorControlModel.levelNamesandIndoorControlModel.activeLevelIndexchannels toIndoorControlModel.levelNamesChannelandIndoorControlModel.activeLevelIndexChannelrespectively. Removed theIndoorControlModel.onLevelClicked()method. Renamed theIndoorControlModel.isMarkedLevel()method toIndoorControlModel.isLevelMarked().
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.FREE_ROAMvalue. 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()method 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.keymust be added toassets. - Removed the
ApiKeysstructure and the corresponding parameter inDGis.initialize. - 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.FEDERAL_ROAD, and others. -
Replaced the
VoiceSelector.setVoicemethod 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
-
Renamed the
LocaleManager.setOverridedLocales()method tooverrideLocales(). -
Moved the
ScreenSizeclass fromru.dgis.maptoru.dgis.common. -
Instead of the
HttpOptions.userSslCertsandHttpOptions.disableSystemSslCertsproperties, use theHttpOptions.certificatesproperty 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()andCamera.removeCustomFollowController()methods for adding and removing controllers.