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

MGLStyleFunction needs a colorSpaceModel property #6721

Closed
1ec5 opened this issue Oct 17, 2016 · 3 comments
Closed

MGLStyleFunction needs a colorSpaceModel property #6721

1ec5 opened this issue Oct 17, 2016 · 3 comments
Labels
GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling

Comments

@1ec5
Copy link
Contributor

1ec5 commented Oct 17, 2016

The iOS and macOS SDKs need to support the new color interpolation option being added in #6442 #8720 via a new colorSpaceModel property on MGLStyleFunction. No need to extend the initializers, since we can assume a default color space model of RGB.

Ideally, the property would be of type CGColorSpaceModel or NSColorSpaceModel. However, we’d have to provide our own HCL color space model and document the fact that some of the common color space models provided by Core Graphics or AppKit, like grayscale, are unavailable. So it might be easier, if less cool, to define our own enumeration.

/cc @friedbunny @tmcw @zugaldia

@1ec5 1ec5 added GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling labels Oct 17, 2016
@1ec5
Copy link
Contributor Author

1ec5 commented Oct 17, 2016

I think we probably will have to provide our own enumeration for this type, because CGColorSpaceModel is new as of iOS 9 and macOS 10.11, and NSColorSpaceModel is new as of macOS 10.10. But we can be consistent with naming at least.

@jfirebaugh
Copy link
Contributor

We removed functions. If we bring back color spaces, it'll be as an expression.

@1ec5
Copy link
Contributor Author

1ec5 commented Aug 21, 2018

#8720 has been repurposed to track the addition of an expression operator. There would still need to be some platform-specific work, so this issue could be reopened to track that when the time comes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS runtime styling
Projects
None yet
Development

No branches or pull requests

2 participants