You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to use GeoJSONSource.clusterProperties with Operator.accumulated.
Why
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 called expression with associated value of type Expression. This will require removing String 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 make Expression.elements public if this route is taken.
The text was updated successfully, but these errors were encountered:
nflahavan
changed the title
Update GeoJSONSource.clusterProperties to support [String: [Expression]]
Update GeoJSONSource.clusterProperties to support [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]
Jul 25, 2022
@ZiZasaurus is there a way to express [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]] with the current state of the iOS mapbox SDK? I can't seem to figure out a way to do it.
New Feature
I would like to be able to use
GeoJSONSource.clusterProperties
withOperator.accumulated
.Why
In order to express
[["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]
and other such expressions, the type for the value of theclusterProperties
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.The text was updated successfully, but these errors were encountered: