Comments (20)
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.
_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.
Looks like "drag" drags map not marker.
from flutter_map_line_editor.
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.
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.
I will try to write minimal example tonight or tomorrow morning. Thanks for your help.
from flutter_map_line_editor.
commenting onPositionChanged did nothing :( the markers get deleted when long press, so events somehow get there.
from flutter_map_line_editor.
BTW. you know you example does not work with new Dart/Flutter, onTap has 2 parameters now.
from flutter_map_line_editor.
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.
from flutter_map_line_editor.
from flutter_map_line_editor.
from flutter_map_line_editor.
from flutter_map_line_editor.
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.
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.
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.
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.
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.
That any better ?
from flutter_map_line_editor.
from flutter_map_line_editor.
Related Issues (20)
- hardcoded DragMarker size HOT 5
- null safety HOT 5
- License? HOT 1
- How do you compute the area of the polygon? HOT 2
- Non-nullable instance field 'polyEditor' must be initialized. HOT 3
- Moving Polygon/Polyline HOT 1
- FLUTTER_MAP RELATIONS: New Documentation HOT 1
- Update LatLng2 to 0.8.1 HOT 2
- Please update cupertino icons on nullsafety branch HOT 2
- Web support HOT 2
- no filled colors on polygon HOT 6
- Make it compatible with latlong2 0.8.1 as in dragmarker HOT 7
- Markers not dragging - again HOT 3
- Inbetween point of a line not quite accurate on low zooms. HOT 5
- Is a point inside of polygon? HOT 1
- Next version HOT 2
- support multiple polygon ? HOT 15
- Polygon case HOT 8
- Make icons be widgets? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_map_line_editor.