-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: introduce feature drag and pointer events handling #162
base: next
Are you sure you want to change the base?
feat: introduce feature drag and pointer events handling #162
Conversation
Added MapGestures drag option.
…y. Added generateFeatureList for geometry handling in examples.
…e querying. Started call of pointer and featureDrag events.
…ctor related code.
Hi, I'm working on a project that needs to update polygons on the map. This PR would make that possible. Any idea when it will be merged in? |
Hi. I have currently stopped work because of the Christmas holidays. From January 7 I will resume work on this PR. I am close to the end of the work |
Awesome! Thanks! |
… using DeepCollectionEquality. Added collection dependency.
I decided not to introduce the Web implementation in the current PR. Implementation of a new way of handling gestures and, consequently, iOS and Web support will follow in a future PR. |
Hi @gabbopalma, I'm sorry for your long wait. I've currently a long going on and probably won't find the time until February for an in-depth review. Though, I did a quick scroll-though and your pr looks promising! |
I tested my code on a potential use case and I think a filter for interactive layers needs to be added. Also, I ran |
…commas to where needed in kt files.
Not sure why codecov lost its configuration. 👀
Could you elaborate a bit please? I'm currently not up-to-date. The queryRenderedFeatures has a filter, hasn't it? It the question how to make use of it when dragging a feature?
It should use the following ruleset: flutter-maplibre/android/build.gradle Line 107 in 85a3d7b
Maybe the dependencies were not loaded? edit: not sure why it alters, I'll try when I find the time for a code review |
Yes, queryRenderedFeatures has a filter, but it is not currently used. I was thinking if we want the user to pass to MapLibreMap, or somewhere else, the list of layers that will then be queried by the MapEventFeatureDrag.
I will try again. Maybe my Android Studio version has some conflicts with this. I was using it to run the gradle commands. |
I see. Yes, I agree it could be good to have fine control over what layers can get dragged and what can't. I've seen that the it is currently defined in |
…troller and MapLibrePlugin
Yes. I think Layer.draggable (or even in StyleLayer) may be the best way to handle this. I will implement it. update: I finally got it done with ktlintFormat. Eureka! |
…interactivity. Added draggableFeatures implementation to each platform StyleController.
…dling in queryRenderedFeatures
…es, MapOptions, feature interactions etc. Minor fixes.
I think I have finished my work here. I tried adding some tests for better coverage about Codecov. I will wait for your review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @gabbopalma, sorry for your long wait. You pull request contains a lot of good stuff. Can you check my comments please?
Could you give me some directions for testing, please? I wasn't able to test the drag functionality in the example app. Is there an example I can use for testing?
I rebased the pr to a new next
branch for the v0.3.0 release. WIth the release of Flutter 3.29.0 I'd like to sneak in another feature release.
Thanks for your work!
edit: also, don't worry about the integration test CIs. There is something odd going on #220.
android/src/main/kotlin/com/github/josxha/maplibre/MapLibreMapController.kt
Show resolved
Hide resolved
android/src/main/kotlin/com/github/josxha/maplibre/MapLibreMapController.kt
Outdated
Show resolved
Hide resolved
…ntType and made dragFeature private. Renamed onLongPressMove to onLongPress. Adjusted onLongPressMove in MapLibreMapStateNative.
…thod in StyleController implementations
…es. Applied dart format.
Hi @josxha. Thank you for your review :)
|
Closes #151 issue.
Important
This PR doesn't introduce the implementation of drag gestures on Web or iOS platforms.