-
Notifications
You must be signed in to change notification settings - Fork 509
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
Implementation of feature querying on iOS #177
Conversation
…n example on how to use the filter.
imo that is to be expected as I'm guessing a valid expression would look like: I can look into the Android side of things. Thanks again for some great work @TimothySealy |
So I'm still tumbling down the rabbit hole regarding the expressions. You are correct that the If we move to the way expressions are defined in the style spec defined in the JS library we would pass the expression as an array and need to translate this to the relevant objects in the different platform. Filtering zoo's would like this: |
@TimothySealy maybe the most straightforward solution for both platforms is to only support a string representation of expressions. On Android you can do something as |
…] , "zoo"]). Android now parses the expression using the raw method.
… a string (representation of the array).
I've updated the code so that the filtering now works on iOS and Android. In my first attempt I've passed a string representation of the expression to use in the filtering. After having a working implementation I've switched to passing the actual array containing the expression instead of its string representation. CI now breaks because of a mismatch in package versions (for the location package). This has been fixed in #239. |
@TimothySealy I've just tested this, but the filter example doesn't seem to have any effect on Android. |
…n example on how to use the filter.
…] , "zoo"]). Android now parses the expression using the raw method.
… a string (representation of the array).
…ter-mapbox-gl into ts-ios-queryrenderedfeatures # Conflicts: # example/lib/map_ui.dart
@m0nac0 I have implemented a toggler for enabling and disabling the filter. Default the filter is turned of. On the user interface page please check whether the filter is enabled (first option in the list). It is correct that if the filter is enabled you should only receive zoo features. An improvement would be to display the polygon of the returned features as visual feedback. Currently the results are only printed as debug messages. I've rebased the branch in order fix the Page conflict and merge issue. |
@TimothySealy I did actually toggle that button, and I also checked that |
@m0nac0 That's strange. I've just tested it in an emulator after the rebase and it seemed to work. Could you maybe provide some of the debug message? I'm particularly interested in the |
@TimothySealy Nevermind, it's working now for me, as well. Apparently the issue was that I didn't provide a valid access token when I was testing it yesterday, because the tiles were still cached anyways. For some reason, rendering the tiles seems to still work without the access token, but filtering not. I'm sorry about the confusion. |
# Conflicts: # lib/src/controller.dart # pubspec.lock
Thank you for rebasing against the latest restructure changes. LGTM |
# Conflicts: # lib/src/controller.dart # pubspec.lock
Closes #163
Remark: Filtering on iOS and Android do not seem to be compatible. The current example works on iOS but not on Android (gives the following
Error converting filter: [0]: Unknown expression "type == 'zoo'".
)