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

Update GeoJSONSource.clusterProperties to support [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]] #1481

Closed
nflahavan opened this issue Jul 23, 2022 · 2 comments

Comments

@nflahavan
Copy link

nflahavan commented Jul 23, 2022

New Feature

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.

@nflahavan nflahavan changed the title Update GeoJSONSource.clusterProperties to support [String: [Expression]] Update GeoJSONSource.clusterProperties to support [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]] Jul 25, 2022
@nflahavan
Copy link
Author

@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.

@nflahavan
Copy link
Author

re-opened as a bug #1571

OdNairy added a commit that referenced this issue Aug 22, 2023
* Add envs to reopen example and enable signposts(disabled by default)

* Fix fresh clone for snapshots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant