Closed Mmisiek closed 2 years ago
I'll try and take a peek tomorrow at this an the other issue. What is _polyEditor.edit() (it may be useful to see that code), does it just return a list of dragmarkers or something, it could be that is resetting the list with a new one each time ? Have you tried with a List of DragMarkers to start off with like the example ?
_polyEditor = new PolyEditor(
addClosePathMarker: true,
points: _editPolyline.points,
pointIcon: Icon(Icons.crop_square, size: 23),
intermediateIcon: Icon(Icons.lens, size: 15, color: Colors.grey),
callbackRefresh: () => {this.setState(() {})},
);
_currentFieldPolygon.points.forEach((latLng) {
_polyEditor.add(_editPolyline.points, latLng);
});
I will try with hardcoded list, it is possible it gets refreshed each time I touch ? But my guess is somehow events are not getting to right layer ?
Thanks
Looks like "drag" drags map not marker.
Sorry, ignore my last comment, I misunderstood what you were doing...I will take a look tomorrow as I have to go offline now, if you can paste a minimal example highlighting the problem, I will try and test.
Out of interest, it may be worth trying to comment out onPositionChanged in MapOptions, just to see if it prevents some grabbing of the drag. Just to isolate if there is some conflict. I don't think it would be that...but maybe start with the line_editor main.dart example and slow reintroduce your parts and see when it breaks.
I will try to write minimal example tonight or tomorrow morning. Thanks for your help.
commenting onPositionChanged did nothing :( the markers get deleted when long press, so events somehow get there.
BTW. you know you example does not work with new Dart/Flutter, onTap has 2 parameters now.
So, I am sorry to say but even your example does not work anymore, you can add and remove markers but not drag them. My version is:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.1, on macOS 11.4 20F71 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.60.2)
[✓] Connected device (2 available)
I had to add "tp" to the onTap as it flutter_map API changed and replace latlng with latlng2. I suspect something in flutter_map API has changed.
Ah I think you need to be using the nullsafety branch on this and dragmarker...I think I will move them into master though a bit later,
On Fri, Oct 1, 2021 at 11:34 PM Mmisiek @.***> wrote:
So, I am sorry to say but even your example does not work anymore, you can add and remove markers but not drag them. My version is:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.1, on macOS 11.4 20F71 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.60.2)
[✓] Connected device (2 available)
I had to add "tp" to the onTap as it flutter_map API changed and replace latlng with latlng2. I suspect something in flutter_map API has changed.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932615073, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YN5KYAEDBV2BOFWZTDM3UEYZQRANCNFSM5FFP23NQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
For the moment I am using new version of Dart but without null safety. I would need to change a lot of code to migrate to null safety. But I will update your example and force null safety in your code and check if it works.
On Fri, Oct 1, 2021, 23:59 Ian @.***> wrote:
Ah I think you need to be using the nullsafety branch on this and dragmarker...I think I will move them into master though a bit later,
On Fri, Oct 1, 2021 at 11:34 PM Mmisiek @.***> wrote:
So, I am sorry to say but even your example does not work anymore, you can add and remove markers but not drag them. My version is:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.1, on macOS 11.4 20F71 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.60.2)
[✓] Connected device (2 available)
I had to add "tp" to the onTap as it flutter_map API changed and replace latlng with latlng2. I suspect something in flutter_map API has changed.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932615073 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AA5YN5KYAEDBV2BOFWZTDM3UEYZQRANCNFSM5FFP23NQ
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932696850, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABC7O4NOQJL5FD2TYPM3BMTUE2UWPANCNFSM5FFP23NQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Ok, flutter_map 0.14.0 breaks dragmarker (and hence line_editor), it works with 0.13.1.
I suspect something is overriding/conflicting with the drag/pan start, as I can't even get onPanStart to fire any more. I'm not sure how easy it will be to fix, but it looks like that's the problem.
On Sat, Oct 2, 2021 at 12:46 PM Mmisiek @.***> wrote:
For the moment I am using new version of Dart but without null safety. I would need to change a lot of code to migrate to null safety. But I will update your example and force null safety in your code and check if it works.
On Fri, Oct 1, 2021, 23:59 Ian @.***> wrote:
Ah I think you need to be using the nullsafety branch on this and dragmarker...I think I will move them into master though a bit later,
On Fri, Oct 1, 2021 at 11:34 PM Mmisiek @.***> wrote:
So, I am sorry to say but even your example does not work anymore, you can add and remove markers but not drag them. My version is:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.1, on macOS 11.4 20F71 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.60.2)
[✓] Connected device (2 available)
I had to add "tp" to the onTap as it flutter_map API changed and replace latlng with latlng2. I suspect something in flutter_map API has changed.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub <
https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932615073
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AA5YN5KYAEDBV2BOFWZTDM3UEYZQRANCNFSM5FFP23NQ
. Triage notifications on the go with GitHub Mobile for iOS <
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android <
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932696850 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABC7O4NOQJL5FD2TYPM3BMTUE2UWPANCNFSM5FFP23NQ
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932738084, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YN5L4KZFFLOSDYEBUX3LUE3WHRANCNFSM5FFP23NQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Ok, I was about to write to you I tried null safe option and same happened (no drag). Not sure if I can rollback map to 0.13.1, I will try.
From: Ian @.> Date: Saturday, October 2, 2021 at 5:41 AM To: ibrierley/flutter_map_line_editor @.> Cc: Mmisiek @.>, Author @.> Subject: Re: [ibrierley/flutter_map_line_editor] Markes not dragging (#20) Ok, flutter_map 0.14.0 breaks dragmarker (and hence line_editor), it works with 0.13.1.
I suspect something is overriding/conflicting with the drag/pan start, as I can't even get onPanStart to fire any more. I'm not sure how easy it will be to fix, but it looks like that's the problem.
On Sat, Oct 2, 2021 at 12:46 PM Mmisiek @.***> wrote:
For the moment I am using new version of Dart but without null safety. I would need to change a lot of code to migrate to null safety. But I will update your example and force null safety in your code and check if it works.
On Fri, Oct 1, 2021, 23:59 Ian @.***> wrote:
Ah I think you need to be using the nullsafety branch on this and dragmarker...I think I will move them into master though a bit later,
On Fri, Oct 1, 2021 at 11:34 PM Mmisiek @.***> wrote:
So, I am sorry to say but even your example does not work anymore, you can add and remove markers but not drag them. My version is:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.5.1, on macOS 11.4 20F71 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.2)
[✓] VS Code (version 1.60.2)
[✓] Connected device (2 available)
I had to add "tp" to the onTap as it flutter_map API changed and replace latlng with latlng2. I suspect something in flutter_map API has changed.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub <
https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932615073
, or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AA5YN5KYAEDBV2BOFWZTDM3UEYZQRANCNFSM5FFP23NQ
. Triage notifications on the go with GitHub Mobile for iOS <
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android <
.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932696850 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABC7O4NOQJL5FD2TYPM3BMTUE2UWPANCNFSM5FFP23NQ
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932738084, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YN5L4KZFFLOSDYEBUX3LUE3WHRANCNFSM5FFP23NQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932745884, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABC7O4IMLSXVCKFBOINAIEDUE34ZFANCNFSM5FFP23NQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
I think the solution for 0.14.0 is to use allowPanningOnScrollingParent: false in MapOptions (allowPanningOnScrollingParent I think was introduced at https://github.com/fleaflet/flutter_map/pull/994 which was rolled into 0.14 which wasn't obvious at all there was a breaking change in there).
See if that helps, if it does, I think I will add that to the docs and merge nullsafety with the master.
Note, I've added a new branch "panfix" if you want to try that (it uses a new branch of dragmarker called panfix also).
If I get a confirmation or two that things work, I'll move to master
Hi Ian, I think this works (at least your example) :) Can you update master and nullsafe branches ? I prefer to use master (no null dafe) at the moment. Thanks for fixing it. Michal
I have merged it with master, so see how you go.
In reality, it's not really a fix thinking about it, it's simply adding allowPanningOnScrollingParent: false, to the example and readme I guess! But it should help others.
If it all works ok, thanks for raising the issue and testing etc!
Can you kick cupertino_icons too ? Because every version of flutter_map_line_editor from git depends on flutter_map_dragmarker from git which depends on cupertino_icons ^0.1.2, every version of flutter_map_line_editor from git requires cupertino_icons ^0.1.2. So, because pest_scope depends on both cupertino_icons ^1.0.3 and flutter_map_line_editor from git, version solving failed.
That any better ?
I would saybit work as expected. Thanks
On Sat, Oct 2, 2021, 13:59 Ian @.***> wrote:
That any better ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ibrierley/flutter_map_line_editor/issues/20#issuecomment-932819573, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABC7O4IJZZFEAODDGM53WX3UE5XB3ANCNFSM5FFP23NQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hi, This plugin is really great but I can't make markers to drag. My map structure:
And MapOptions:
I get polyline with markers, I think I can even add new marker to the line but dragging does not work at all :(. Thanks