Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[android] add support for mapzen terrarium raster-dem encoding #11339

Merged
merged 1 commit into from
Mar 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* 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>
*/
Expand All @@ -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
Expand Down Expand Up @@ -246,6 +248,20 @@ public void setBounds(@Size(value = 4) Float... bounds) {
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;
}
Expand Down Expand Up @@ -313,6 +329,10 @@ Map<String, Object> toValueObject() {
if (center != null) {
result.put("center", center);
}
if (encoding != null) {
result.put("encoding", encoding);
}


return result;
}
Expand Down