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'd like to filter features from a source based on (some property) AND (distance within a radius).
I could not find a way to convert the point to the filter expression.
There is not much document about SourceQueryOptions in iOS SDK, and there is no example using that neither.
I've been struggling to make it work for the last few days. I've checked many iOS and GL-JS documents and stack overflow, none of them worked for me.
However, the app would crash and the Xcode error log reads:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Value Turf.GeoJSONObject.feature(feature id:
empty_features: ) of type __SwiftValue must be either NSNumber, NSString, NSArray, NSDictionary, NSNull'
I tried to replace GeoJSONObject.feature(point) to Turf.Point(coord) and many other values, none would work.
Standard Swift/iOS expression does not work for filter.
I also noticed the standard Swift/iOS way to define expression does not work for the filter case.
For example, if I use as simple as
It would not work, the Xcode would crash with error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Value [==, [get, SUMLEV], 750.0] of type __SwiftValue must be either NSNumber, NSString, NSArray, NSDictionary, NSNull'
It will return me >7k features and the result seems not correct. It returns many features have SUMLEV != 750.
So it looks like the "all" AND condition is not respected.
Expected behavior
I'd like to filter features from a source based on (some property) AND (distance within a radius).
Notes / preliminary analysis
Additional links and references
The text was updated successfully, but these errors were encountered:
Environment
Observed behavior and steps to reproduce
I'd like to filter features from a source based on (some property) AND (distance within a radius).
I could not find a way to convert the point to the filter expression.
There is not much document about SourceQueryOptions in iOS SDK, and there is no example using that neither.
I've been struggling to make it work for the last few days. I've checked many iOS and GL-JS documents and stack overflow, none of them worked for me.
The code is pretty much like the one below
However, the app would crash and the Xcode error log reads:
I tried to replace
GeoJSONObject.feature(point)
toTurf.Point(coord)
and many other values, none would work.Standard Swift/iOS expression does not work for filter.
I also noticed the standard Swift/iOS way to define
expression
does not work for the filter case.For example, if I use as simple as
It would not work, the Xcode would crash with error:
But if I use
It would work.
The
'all'
expression seems not working correctlyFor example:
will return me ~5k features;
But when I also used
It will return me >7k features and the result seems not correct. It returns many features have
SUMLEV != 750
.So it looks like the
"all"
AND condition is not respected.Expected behavior
I'd like to filter features from a source based on (some property) AND (distance within a radius).
Notes / preliminary analysis
Additional links and references
The text was updated successfully, but these errors were encountered: