From 915b91f91440b780560af2e69b0b8c394a7ac88a Mon Sep 17 00:00:00 2001 From: Molly Lloyd Date: Tue, 27 Feb 2018 15:28:00 -0800 Subject: [android] add support for mapzen terrarium raster-dem encoding --- .../com/mapbox/mapboxsdk/style/sources/TileSet.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java index 54e4e5f5d3..25df2d91e7 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java @@ -9,6 +9,7 @@ import java.util.Map; /** * Tile set, allows using TileJson specification as source. + * Note that `encoding` is only relevant to `raster-dem` sources, and is not supported in the TileJson spec. * * @see The tileset specification */ @@ -28,6 +29,7 @@ public class TileSet { private Float maxZoom; private Float[] bounds; private Float[] center; + private String encoding; /** * @param tilejson A semver.org style version number. Describes the version of the TileJSON spec that is implemented @@ -246,6 +248,20 @@ public class TileSet { this.bounds = bounds; } + public String getEncoding() { + return encoding; + } + + /** + * Default: "mapbox". The encoding formula for a raster-dem tileset. + * Supported values are "mapbox" and "terrarium". + * + * @param encoding the String encoding formula to set + */ + public void setEncoding(String encoding) { + this.encoding = encoding; + } + public Float[] getCenter() { return center; } @@ -313,6 +329,10 @@ public class TileSet { if (center != null) { result.put("center", center); } + if (encoding != null) { + result.put("encoding", encoding); + } + return result; } -- cgit v1.2.1