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

Add expression accessors #10721

Closed
tobrun opened this issue Dec 16, 2017 · 3 comments
Closed

Add expression accessors #10721

tobrun opened this issue Dec 16, 2017 · 3 comments
Labels
Android Mapbox Maps SDK for Android feature

Comments

@tobrun
Copy link
Member

tobrun commented Dec 16, 2017

Tailwork of #10654, allow to get an existing layout/paint porperty or filter expression from a layer.

Current value/function api:

assertNotNull(layer.getSymbolPlacement());
assertNotNull(layer.getSymbolPlacement().getFunction());
assertEquals(CameraFunction.class, layer.getSymbolPlacement().getFunction().getClass());
assertEquals(IntervalStops.class, layer.getSymbolPlacement().getFunction().getStops().getClass());
assertEquals(1, ((IntervalStops) layer.getSymbolPlacement().getFunction().getStops()).size());
@tobrun tobrun added Android Mapbox Maps SDK for Android feature labels Dec 16, 2017
@tobrun tobrun added this to the android-v6.0.0 milestone Dec 16, 2017
@1ec5
Copy link
Contributor

1ec5 commented Dec 18, 2017

#10726 implemented some accessors in mbgl that could be useful for implementing fully typed accessors in Java. #10714 could also help, but that approach would probably not benefit from compile-time type checking.

@1ec5
Copy link
Contributor

1ec5 commented Jan 26, 2018

#10726 implemented some accessors in mbgl that could be useful for implementing fully typed accessors in Java.

Here’s how the iOS/macOS SDK is using these accessors:

id MGLJSONObjectFromMBGLExpression(const mbgl::style::expression::Expression &mbglExpression) {

@tobrun
Copy link
Member Author

tobrun commented Mar 14, 2018

Landed in #11352

@tobrun tobrun closed this as completed Mar 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android feature
Projects
None yet
Development

No branches or pull requests

2 participants