0.4-android
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
andgetCameraType
and theCameraType
enum were added toMapController
to make switching camera modes more convenient. (#793) versionName
andversionCode
variables are now available on theBuildConfig
object. (#796)- The
DebugFlag
enum has a new entry,TANGRAM_STATS
, to enable an on-screen graph of frame times. (#790) MapView$getMapAsync
andMapController$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
methodcoordinatesAtScreenPosition(float x, float y)
has been changed toscreenPositionToLngLat(PointF position)
. The method now returnsnull
if the given screen position does not correspond to a geographic point. (#809, #822) MapController
has a new methodlngLatToScreenPosition(LngLat position)
which performs the inverse ofscreenPositionToLngLat(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 methoduseCachedGlState(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 anActivity
using aMapView
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 yourActivity
. (#810 & #844)