-
Notifications
You must be signed in to change notification settings - Fork 157
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
clusterProperties does not fully support Style Specification. #1571
Comments
Hi @nflahavan -- Thanks for writing up this report and including all of this detail here. We've made some changes -- in this PR -- which bring Update: This change is now available in v10.11.0-rc.1. |
Hi @pjleonard37. I just got a chance to look at your pr and the solution makes sense to me! 👍 Thanks for putting in the work on this. |
Glad to hear it - happy clustering! |
Environment
Observed behavior and steps to reproduce
it is not possible to express
[["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]
viaExpression
, therefore it is not possible to use[["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]
to express a cluster property.Expected behavior
I expect to be able to use
[["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]
as a value in the dictionaryclusterProperties
.Notes / preliminary analysis
In order to express
[["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]
and other such expressions, the type for the value of the clusterProperties dictionary must support an array of two expressions.I believe this can be accomplished by adding another
Operator
calledexpression
with associated value of typeExpression
. This will require removingString
raw type from the enum. Custom encoder/decoder function/init will need to be added as well.Another possible solution is to change the type of
clusterProperties
to[String: [Expression.Element]]
. This simple solution is less type safe but much easier to implement. It would be nice to makeExpression.elements
public if this route is taken.Additional links and references
clusterProperties Style spec
clusterProperties API spec
The text was updated successfully, but these errors were encountered: