diff options
author | Molly Lloyd <mollymerp@users.noreply.github.com> | 2018-03-01 11:15:36 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-01 11:15:36 -0800 |
commit | d5829d0d001c363dab63d19a171e3086754dfcf2 (patch) | |
tree | d0a089d79e9a34f4cce2d39f084858fbec422cb0 /platform | |
parent | 5b4b3c5c1f95892bdc6dc7edcca2bba0059a2584 (diff) | |
download | qtlocation-mapboxgl-d5829d0d001c363dab63d19a171e3086754dfcf2.tar.gz |
[android] add support for mapzen terrarium raster-dem encoding (#11339)
Diffstat (limited to 'platform')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java | 20 |
1 files changed, 20 insertions, 0 deletions
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 <a href="https://github.com/mapbox/tilejson-spec/tree/master/2.1.0">The tileset specification</a> */ @@ -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; } |