Coder Social home page Coder Social logo

Comments (20)

ibrierley avatar ibrierley commented on August 16, 2024

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 ?

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024
    _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

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

Looks like "drag" drags map not marker.

from flutter_map_line_editor.

ibrierley avatar ibrierley commented on August 16, 2024

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.

from flutter_map_line_editor.

ibrierley avatar ibrierley commented on August 16, 2024

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.

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

I will try to write minimal example tonight or tomorrow morning. Thanks for your help.

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

commenting onPositionChanged did nothing :( the markers get deleted when long press, so events somehow get there.

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

BTW. you know you example does not work with new Dart/Flutter, onTap has 2 parameters now.

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

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.

from flutter_map_line_editor.

ibrierley avatar ibrierley commented on August 16, 2024

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

from flutter_map_line_editor.

ibrierley avatar ibrierley commented on August 16, 2024

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

from flutter_map_line_editor.

ibrierley avatar ibrierley commented on August 16, 2024

I think the solution for 0.14.0 is to use allowPanningOnScrollingParent: false in MapOptions (allowPanningOnScrollingParent I think was introduced at fleaflet/flutter_map#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.

from flutter_map_line_editor.

ibrierley avatar ibrierley commented on August 16, 2024

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

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

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

from flutter_map_line_editor.

ibrierley avatar ibrierley commented on August 16, 2024

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!

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

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.

from flutter_map_line_editor.

ibrierley avatar ibrierley commented on August 16, 2024

That any better ?

from flutter_map_line_editor.

Mmisiek avatar Mmisiek commented on August 16, 2024

from flutter_map_line_editor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.