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

[style-spec] update line-gradient doc, add an example expression #12882

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

chriswhong
Copy link
Contributor

This PR updates the doc value for the line-gradient property in the style spec.

The previous information was ambiguous and only stated that this property defines a gradient.

The updated information explains that the value must be an expression that makes use of the line-progress input. Especially important is the note that line-progress is the percent distance along the line as measured in the webmercator projected coordinate space (not the length as measured on the wgs84 spheroid).

(This bit of information was critical in debugging some misalignments when attempting to use line-gradient to visualize EV state of charge in the directions api playground)

Also adds an example espression, the same expression used in the line-gradient GL JS example.

image

@chriswhong chriswhong requested a review from a team as a code owner September 11, 2023 22:15
@stepankuzmin stepankuzmin added docs 📜 skip changelog Used for PRs that do not need a changelog entry labels Sep 12, 2023
Copy link
Contributor

@stepankuzmin stepankuzmin 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! However, there are multiple unrelated formatting changes. I assume it's some automated tool like Prettier?

@chriswhong
Copy link
Contributor Author

Thanks for flagging, I fixed it.

@stepankuzmin stepankuzmin merged commit 6e28d67 into main Sep 12, 2023
33 checks passed
@stepankuzmin stepankuzmin deleted the line-gradient-doc branch September 12, 2023 12:11
@stepankuzmin
Copy link
Contributor

@chriswhong Thanks! Merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs 📜 skip changelog Used for PRs that do not need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants