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

Platform bindings for within expression #175

Closed
chloekraw opened this issue Feb 24, 2020 · 3 comments
Closed

Platform bindings for within expression #175

chloekraw opened this issue Feb 24, 2020 · 3 comments
Assignees
Labels
enhancement New feature or request expressions

Comments

@chloekraw
Copy link
Contributor

chloekraw commented Feb 24, 2020

Tracking the development of platform bindings for the new within expression (mapbox/mapbox-gl-native#16157; mapbox/mapbox-gl-native#16194)

If it's possible, because this isn't too complex, it would be great to get this merged this week before the next alpha release.

cc @julianrex @zmiao

@chloekraw chloekraw added enhancement New feature or request expressions labels Feb 24, 2020
@1ec5
Copy link
Contributor

1ec5 commented Feb 25, 2020

I think the most natural NSExpression implementation of this expression operator would be SELF IN %@ (alternatively %@ CONTAINS SELF), where %@ is an MGLFeature. Since we’d be overloading the IN and CONTAINS operators, this implementation will only recognize operands it can lexically detect as MGLFeature instances.

As always, if the developer needs something syntactically closer to JSON, they can use MGL_FUNCTION() or +[NSExpression expressionWithJSONObject:].

@1ec5
Copy link
Contributor

1ec5 commented Feb 25, 2020

This feature depends on gl-native v1.2.0.

@zmiao
Copy link
Contributor

zmiao commented Mar 2, 2020

@1ec5 here is the Android binding for within expression, please have a look https://github.com/mapbox/mapbox-gl-native-android/pull/198/files, please be aware currently toGeoJSON is not implemented in MGLConversion.h, it also caused problems with android_conversion.hpp, extra adaptation is done in mapbox/mapbox-gl-native#16243

@1ec5 1ec5 closed this as completed in #184 Mar 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request expressions
Projects
None yet
Development

No branches or pull requests

3 participants