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

[core] Add `line-gradient` property #12575

Merged
merged 2 commits into from Aug 23, 2018

Conversation

Projects
None yet
5 participants
@pozdnyakov
Contributor

pozdnyakov commented Aug 8, 2018

Porting of mapbox/mapbox-gl-js#6303
See the link above for the description of the feature and
its limitations).

Based on patch from @lbud (Lauren Budorick).

@pozdnyakov

This comment has been minimized.

Show comment
Hide comment
@pozdnyakov

pozdnyakov Aug 9, 2018

Contributor

@kkaefer please review, tagging @tmpsantos @brunoabinader

Contributor

pozdnyakov commented Aug 9, 2018

@kkaefer please review, tagging @tmpsantos @brunoabinader

@pozdnyakov

This comment has been minimized.

Show comment
Hide comment
@pozdnyakov

pozdnyakov Aug 9, 2018

Contributor

This PR fixes #11718

Contributor

pozdnyakov commented Aug 9, 2018

This PR fixes #11718

@1ec5

In addition to the following, please update the iOS and macOS changelogs to note the addition of these new properties. Thanks!

#if TARGET_OS_IPHONE
/**
Defines a gradient with which to color a line feature. Can only be used with
GeoJSON sources that specify `"lineMetrics": true`.

This comment has been minimized.

@1ec5

1ec5 Aug 9, 2018

Member

This documentation comment uses JSON notation, so we’ll need to override it in an entry in platform/darwin/scripts/style-spec-overrides-v8.json:

Defines a gradient with which to color a line feature. This property only has an effect on lines defined by an MGLShapeSource whose MGLShapeSource.calculatesLineDistanceMetrics property is set to YES.

Speaking of which, we’ll need to add that calculatesLineDistanceMetrics property to MGLShapeSource before developers will be able to use this property on iOS/macOS.

@1ec5

1ec5 Aug 9, 2018

Member

This documentation comment uses JSON notation, so we’ll need to override it in an entry in platform/darwin/scripts/style-spec-overrides-v8.json:

Defines a gradient with which to color a line feature. This property only has an effect on lines defined by an MGLShapeSource whose MGLShapeSource.calculatesLineDistanceMetrics property is set to YES.

Speaking of which, we’ll need to add that calculatesLineDistanceMetrics property to MGLShapeSource before developers will be able to use this property on iOS/macOS.

Defines a gradient with which to color a line feature. Can only be used with
GeoJSON sources that specify `"lineMetrics": true`.
This property is only applied to the style if `lineDasharray` is set to `nil`,

This comment has been minimized.

@1ec5

1ec5 Aug 9, 2018

Member

This should say lineDashPattern. The codegen script isn’t aliasing lineDasharray for some reason.

@1ec5

1ec5 Aug 9, 2018

Member

This should say lineDashPattern. The codegen script isn’t aliasing lineDasharray for some reason.

@pozdnyakov

This comment has been minimized.

Show comment
Hide comment
@pozdnyakov

pozdnyakov Aug 10, 2018

Contributor

@1ec5 Thanks for your comments! I've made a #12604 introducing a new property to MGLShapeSource, please take a look! After #12604 lands I'll include the updated style-spec-overrides-v8.json to this PR.

Contributor

pozdnyakov commented Aug 10, 2018

@1ec5 Thanks for your comments! I've made a #12604 introducing a new property to MGLShapeSource, please take a look! After #12604 lands I'll include the updated style-spec-overrides-v8.json to this PR.

Show outdated Hide outdated src/mbgl/renderer/buckets/line_bucket.cpp
Show outdated Hide outdated src/mbgl/renderer/buckets/line_bucket.cpp
Show outdated Hide outdated src/mbgl/renderer/buckets/line_bucket.cpp
Show outdated Hide outdated src/mbgl/renderer/buckets/line_bucket.cpp
Show outdated Hide outdated src/mbgl/style/expression/parsing_context.cpp
void LineLayer::setLineGradient(ColorRampPropertyValue value) {
if (value == getLineGradient())
return;

This comment has been minimized.

@kkaefer

kkaefer Aug 10, 2018

Contributor

Braces

@kkaefer

kkaefer Aug 10, 2018

Contributor

Braces

This comment has been minimized.

@pozdnyakov

pozdnyakov Aug 10, 2018

Contributor

This is a generated file, I could introduce braces generation to scripts/generate-style-code.js in a follow-up PR

@pozdnyakov

pozdnyakov Aug 10, 2018

Contributor

This is a generated file, I could introduce braces generation to scripts/generate-style-code.js in a follow-up PR

@pozdnyakov

This comment has been minimized.

Show comment
Hide comment
@pozdnyakov

pozdnyakov Aug 10, 2018

Contributor

@kkaefer Thanks for the review! The latest patch is modified accordingly.

Contributor

pozdnyakov commented Aug 10, 2018

@kkaefer Thanks for the review! The latest patch is modified accordingly.

@tobrun tobrun added iOS macOS labels Aug 13, 2018

@tobrun tobrun referenced this pull request Aug 13, 2018

Merged

line-progress expression + line-gradient example #12615

1 of 2 tasks complete
@pozdnyakov

This comment has been minimized.

Show comment
Hide comment
@pozdnyakov

pozdnyakov Aug 22, 2018

Contributor

@kkaefer could you take a look?

Contributor

pozdnyakov commented Aug 22, 2018

@kkaefer could you take a look?

pozdnyakov and others added some commits Aug 8, 2018

[core] Add `line-gradient` property
Porting of mapbox/mapbox-gl-js#6303
See the link above for the description of the feature and
its limitations).

Based on patch from @lbud (Lauren Budorick).

@pozdnyakov pozdnyakov merged commit fc26f2a into master Aug 23, 2018

21 checks passed

ci/circleci: android-debug-arm-v7 Your tests passed on CircleCI!
Details
ci/circleci: android-release Your tests passed on CircleCI!
Details
ci/circleci: clang-tidy Your tests passed on CircleCI!
Details
ci/circleci: ios-debug Your tests passed on CircleCI!
Details
ci/circleci: ios-release Your tests passed on CircleCI!
Details
ci/circleci: linux-clang-3.8-libcxx-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-clang4-sanitize-address Your tests passed on CircleCI!
Details
ci/circleci: linux-clang4-sanitize-thread Your tests passed on CircleCI!
Details
ci/circleci: linux-clang4-sanitize-undefined Your tests passed on CircleCI!
Details
ci/circleci: linux-gcc4.9-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-gcc5-debug-coverage Your tests passed on CircleCI!
Details
ci/circleci: macos-debug Your tests passed on CircleCI!
Details
ci/circleci: nitpick Your tests passed on CircleCI!
Details
ci/circleci: node-clang39-release Your tests passed on CircleCI!
Details
ci/circleci: node-gcc6-debug Your tests passed on CircleCI!
Details
ci/circleci: node-macos-release Your tests passed on CircleCI!
Details
ci/circleci: qt4-linux-gcc5-release Your tests passed on CircleCI!
Details
ci/circleci: qt5-linux-gcc5-release Your tests passed on CircleCI!
Details
ci/circleci: qt5-macos-debug Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
coverage/coveralls Coverage decreased (-0.02%) to 69.139%
Details

@pozdnyakov pozdnyakov deleted the line_gradient branch Aug 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment