Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for mapzen terrain #6110

Merged
merged 14 commits into from
Feb 12, 2018
Merged

Adds support for mapzen terrain #6110

merged 14 commits into from
Feb 12, 2018

Conversation

mollymerp
Copy link
Contributor

continuing from @ibesora's work at #6024

@ibesora I rebased your PR and fixed the merge conflicts, and then I added a couple comments and tests 😊 . I don't have push access to your branch, so I made this new one (as I did with the maxzoom PR)

@ibesora
Copy link

ibesora commented Feb 8, 2018

Looks great! You guys have such a nice project structure. Great work!

@mollymerp
Copy link
Contributor Author

mollymerp commented Feb 8, 2018

@ibesora here is the gl-native equivalent mapbox/mapbox-gl-native#11154

Copy link
Contributor

@anandthakker anandthakker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆒 looks good to me! Couple of nitpicks inline

@@ -57,22 +57,14 @@ class DEMData {
this.loaded = !!data;
}

loadFromImage(data: RGBAImage) {
loadFromImage(data: RGBAImage, encoding?: "mapbox" | "terrarium") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encoding can be non-optional here

@@ -21,11 +21,12 @@ class RasterDEMTileWorkerSource {
}

loadTile(params: WorkerDEMTileParameters, callback: WorkerDEMTileCallback) {
const uid = params.uid;
const uid = params.uid,
encoding = params.encoding || "mapbox";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the || "mapbox" shouldn't be needed since WorkerDemTileParameters.encoding is required.

@mollymerp mollymerp merged commit f13c86e into master Feb 12, 2018
@mollymerp mollymerp deleted the ibesora-mapzen-terrain branch February 12, 2018 19:31
pathmapper pushed a commit to pathmapper/mapbox-gl-js that referenced this pull request Feb 13, 2018
* Added the encoding parameter to the raster-dem source type

* Changes proposed by @mollymerp

* Changed the raster-dem description and expanded the encoding parameter one

* Changed the description in the style spec reference

* Fixes linter errors

* Changed ts type

* Proposed changes

* Bug

* Added a default value when the RasterDEMTileWorkerSource is called without params

* Adds default value to pass unit tests

* Explicit encoding type and _ to private functions

* add guard for invalid encoding parameter and unit test

* add terrarium render test

* address review comments
pathmapper pushed a commit to pathmapper/mapbox-gl-js that referenced this pull request Feb 13, 2018
* Added the encoding parameter to the raster-dem source type

* Changes proposed by @mollymerp

* Changed the raster-dem description and expanded the encoding parameter one

* Changed the description in the style spec reference

* Fixes linter errors

* Changed ts type

* Proposed changes

* Bug

* Added a default value when the RasterDEMTileWorkerSource is called without params

* Adds default value to pass unit tests

* Explicit encoding type and _ to private functions

* add guard for invalid encoding parameter and unit test

* add terrarium render test

* address review comments
@ibesora ibesora mentioned this pull request Jul 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants