Skip to content

4.4.0

Compare
Choose a tag to compare
@mtehver mtehver released this 21 Jul 09:06
· 188 commits to master since this release

This version is a major update and brings several new features, major performance improvements and lots of fixes. It is recommended to migrate to this version, as there are no further planned releases for 4.3.x series.

Important: previous SDK versions for Android were distributed via jcenter repository. As jcenter is now closed, we have moved to mavenCentral. If using Gradle for your builds, simply replace jcenter() in 'repositories' section with mavenCentral().

Important: previous SDK versions for iOS were distributed as fat frameworks. Starting from 4.4.0 we have moved to newer xcframework format. In addition, there are now two SDK builds for iOS: legacy version ('CartoMobileSDK') and Metal version ('CartoMobileSDK-Metal'). Metal version uses OpenGLES to Metal translator, thus does not depend on deprecated iOS APIs, but is significantly larger and a bit slower.

New requirements:

  • Android 3.0 (API 11), previously 2.3 (API 9)
  • iOS 9.0, previously 7.0
  • CocoaPods 1.10.1, previously 1.6
  • (Optional) Carthage 0.38, previously 0.35

Key highlights:

  • Much faster CartoCSS processing and compilation. Loading and initialization of CARTO vector layers is now about 3x faster.
  • 30-40% faster vector tile decoding performance and 10% lower memory consumption during decoding.
  • Reworked tile loading and prefetching algorithms to provide more responsive UX.
  • Various compilation tweaks, making SDK binaries 10-15% smaller on various platforms.
  • 3D NML models can now be used together with bitmap markers, with same basic features (auto orientation, transition animations, overlap analysis)
  • Upgraded built-in Valhalla routing engine to version 3.1.1 (SDK 4.3.x included 3.0.9).
  • New TextureMapView class for Android for applications that need to use MapView with fragments.
  • Additional map callback that provides detailed information about the user interactions.
  • There are now two prebuilt versions of iOS frameworks: a legacy version using OpenGLES rendering backend and a new version using OpenGLES -> Metal API converter that does not use deprecated iOS APIs.
  • iOS builds now use 'xcframework' distribution format and include simulator binary for M1 Macs.
  • SDK built-in vector styles now include fonts and glyphs for Arabic, Hebrew, Georgian and Armenian locales.

New features:

  • Added TextureMapView class and MapViewInterface interface to the SDK. TextureMapView is a subclass of android.view.TextureView and behaves better in apps built from fragments. MapViewInterface provides a common interface for both MapView and TextureMapView.
  • Added getDescription method to RoutingInstruction. This provides textual description of the instruction. The description depends on the routing instruction, it can be either generated by the engine or by the SDK.
  • Added UI based interaction callback to MapEventListener (onMapInteraction method). The callback receives detailed information about the type of the interaction.
  • NMLModel is now a subclass of Billboard. This allows using billboard features like special scaling, orientation modes and transition animations for 3D models.
  • Introduced carto.utils.DontObfuscate annotation for Android Java library. This can be used to finetune Proguard obfuscation rules.

Removed features and API changes:

  • Removed deprecated compressToPng method from Bitmap (replaced with compressToPNG)
  • Removed deprecated NMLModel constructors (replaced with constructors with NMLModelStyle argument)
  • Removed getGeometryTagFilters and setGeometryTagFilters methods from RoutingRequest. They are replaced with getPointParameter/setPointParameter methods (with 'geometry_tag_filter' parameter)
  • Removed setResolution method from TorqueTileDecoder, changed 'resolution' definition for getResolution method to reflect actual resolution defined in CartoCSS

Changes:

  • Tile prioritization during tile loading has been reworked to provide quicker feedback, by fetching shared parent tiles when appropriate
  • Cancelling of tile loading and decoding is more flexible, puts less pressure on tile caches
  • Removed duplicate points in Valhalla routing results, consecutive manuevers can now share the endpoints. This uses the same convention as other routing engines, but may potentially break apps that depend on the old behaviour.
  • SolidLayer is now deprecated. If really needed, a custom VectorTileLayer or RasterTileLayer can be used instead.
  • CartoOnlineRoutingService is now deprecated, third party online routing services should be used instead
  • Address is now depreacted and will be removed in future versions. use GeocodingAddress instead (currently a subclass of Address)
  • setRotationAngle, getRotationAngle methods are deprecated in NMLModel, use setRotation, getRotation instead.
  • Added setRotationAxis, getRotationAxis methods to NMLModel
  • Added setOrientationMode, getOrientationMode, setScalingMode, getScalingMode methods to NMLModelStyleBuilder
  • Added getOrientationMode, getScalingMode, getModelAsset methods to NMLModelStyle
  • Implemented smarter caching logic for CARTO online tile sources. New implementation can keep larger number of tiles in memory and uses better zoom-based tile prioritization during eviction.
  • Added getLayerBlendSpeed, setLayerBlendSpeed, getLabelBlendSpeed, setLabelBlendSpeed methods to VectorTileLayer, for controlling transition animations.
  • Added getTileBlendSpeed, setTileBlendSpeed methods to RasterTileLayer, for controlling transition animations.
  • All street names (separated using '/') are now included in Valhalla routing results
  • Fixed billboard size animations not working when using BILLBOARD_SCALING_WORLD_SIZE size mode
  • Fixed potential native crash when geocoding databases were corrupted
  • Fixed potential native crash when map packages were corrupted
  • Tweaked memory usage of offline packages, fixed potential issues with read/write access rights
  • Made SolidLayer work in globe mode
  • Added bitmap argument nullptr check to SolidLayer constructor
  • Fixed lighting direction calculation in NMLModelLODTreeRenderer (wrong sign)
  • Added getAnimationDuration method to TorqueTileDecoder
  • Added Resolution property to TorqueTileDecoder for dotnet APIs.
  • Fixed getParent method in MapTile to handle negative tile coordinates
  • Fixed NMLModel rotation in globe rendering mode
  • Fixed complex offline geocoding queries failing due to memory constraints
  • Fixed slow loading of Torque tiles
  • Optimized handling of color interpolation expression in vector tile renderer
  • Started using latest FreeType and HarfBuzz libraries to render localized names
  • Replaced 'msdfgen' Signed Distance Field glyph render with official FreeType SDF glyph renderer.
  • Reduced memory reallocation when decoding vector tiles
  • Dropped glyph preloading when generating fonts to speeds up map initialization
  • Improved error reporting for CartoCSS interpolation expression issues
  • Better handling and optimization of 'match' operator when compiling CartoCSS property sets
  • Implemented various MBVT decoder optimizations, including decoded geometry cache
  • Added extra vector tile label sorting rule, to make visible label selection more deterministic
  • Added model color support for NML models. This can be set using setColor method in NMLModelStyleBuilder.
  • Added support for generic 'frame-offset' filters for Torque styles. Previously only equal comparison was available.
  • Added support for cumulative data aggregation for Torque layers
  • Changed vector tile background rendering order, fixed stencil configuration detection when FBOs are used.
  • Optimized rendering of VT layers with 'comp-op' defined.
  • Fixed potential issues when calculating intersections with 3D polygons.
  • Changed internal vector tile rendering order, rendering is done done strictly per-layer, not per-tile. This fixes issues when stencil buffer is not available or switched off (Torque rendering).
  • Fixed orientation angle interaction with line placements in TextSymbolizer
  • Tweaks to marker placements on line geometry when using MarkersSymbolizer
  • Changed argument types of setCapacity in cache classes from unsigned int to unsigned long on iOS, so that >4GB caches can be used on 64-bit targets.
  • Fixed CartoCSS string-expression evaluation issue, causing some misoptimizations
  • GeoJSONGeometryReader and GeoJSONGeometryWriter are now RFC7946 compliant and accept null geometry in features.
  • GeoJSONVectorTileDataSource now supports features with null geometry and non-object properties
  • Added support for shorthand-encoding of 'nutiparameters' in project.json files
  • SDK now catches feature processing exceptions earlier and report thems without causing whole tile decoding to fail.
  • Fixed rendering artifacts with larger halo radiuses in vector tile renderer
  • Fixed potential synchronization issues regarding tile invalidation and caching
  • Fixed layers not being correctly refreshed in rare cases
  • Implemented more robust time interval calculation for transition animations
  • Fixed potential deadlock issue with TouchHandler class. Removed redundant onMapMoved callbacks.
  • Fixed potential deadlocks in AnimationHandler and KineticEventHandler when certain SDK APIs were used in MapEventListener callbacks
  • Changed compilation flags for 32-bit Android targets to make then compatible with really old devices not supporting NEON extensions
  • Enabled Link Time Code Generation for UWP builds. This results in smaller and faster binaries.
  • Optimized protobuf library compilation, making SDK binaries 3-5% smaller.
  • Replaced Cryptopp library dependency in SDK with Botan library, fixing portability issues
  • Lots of fixes in build scripts

Install with package management

  • Android gradle:

    compile 'com.carto:carto-mobile-sdk:4.4.0@aar'

  • iOS CocoaPod:

  pod 'CartoMobileSDK', '4.4.0'
  pod 'CartoMobileSDK-Metal', '4.4.0'
  • Xamarin and Visual Studio Package Manager (nuget) console:
  PM> Install-Package CartoMobileSDK.iOS -Version 4.4.0
  PM> Install-Package CartoMobileSDK.Android -Version 4.4.0
  PM> Install-Package CartoMobileSDK.UWP -Version 4.4.0