Skip to content

0.4-android

Compare
Choose a tag to compare
@matteblair matteblair released this 22 Jul 23:00

This is a major update to the Tangram Android SDK. There are several new features and breaking changes to the Android SDK interface in this release.

Features

  • New methods setCameraType and getCameraType and the CameraType enum were added to MapController to make switching camera modes more convenient. (#793)
  • versionName and versionCode variables are now available on the BuildConfig object. (#796)
  • The DebugFlag enum has a new entry, TANGRAM_STATS, to enable an on-screen graph of frame times. (#790)
  • MapView$getMapAsync and MapController$loadScene now accept HTTP(S) URLs as scene file paths. Relative URLs specified within these scenes are resolved relative to the original URL of the scene file. Scene updates can also be performed asynchronously. (#776)
  • The MapController method coordinatesAtScreenPosition(float x, float y) has been changed to screenPositionToLngLat(PointF position). The method now returns null if the given screen position does not correspond to a geographic point. (#809, #822)
  • MapController has a new method lngLatToScreenPosition(LngLat position) which performs the inverse of screenPositionToLngLat(PointF position). (#809, #822)
  • Scene files used with tangram-es can now use the 'import' syntax to combine and modularize multiple scene files. (#776)
  • Scene files used with tangram-es can now use the 'dash array' syntax to add patterns to lines. (#772)
  • Scene files used with tangram-es can now specify a texture by using a base64 data URI as the URL for the texture,which allows you to include small textures "inline". (cc399b9)
  • MapController has a new method useCachedGlState(boolean use) which enables minor internal rendering optimization for applications that do not use OpenGL outside of tangram-es. See the 'Fixes' section for an explanation. (#785)
  • Label placement has been re-engineered to both reduce CPU usage and fit more labels into a given view. (#749)

Fixes

  • Several potential cases of uninitialized member access in native code have been corrected. (#803, #835, #837)
  • A bug that caused onViewComplete() to never execute was fixed. (#802)
  • Previously it was possible for OpenGL calls outside of tangram-es to interfere with internal state tracking and cause unexpected visual artifacts. This state tracking is now reset at the beginning of each frame unless useCachedGlState() has been explicitly enabled by the application. (#785)
  • Previously, some properties of a map (including the map position and any features added through a MapData) would not be reset when an Activity using a MapView was destroyed and re-created. Due to some refactoring of the tangram-es native library, this is no longer the case. All properties and data associated with a map will now be created and destroyed along with the lifecycle of your Activity. (#810 & #844)