fleaflet / flutter_map

A versatile mapping package for Flutter. Simple and easy to learn, yet completely customizable and configurable, it's the best choice for mapping in your Flutter app.

Home Page:https://pub.dev/packages/flutter_map

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Polylines that are not near each other seems like they want to connect

enricostrijks opened this issue · comments

What is the bug?

IMG_6226

When there is some distance between a few polylines that are in the same array and they're added later they seem to want to connect to each other. Only the user who adds these lines see them, but since my saving to my db filters out the polylines with less than 2 points, it doesn't save to my db.

If this is not an issue but I've done something wrong please let me know!

How can we reproduce it?

Add polylines to an array that have a few 100 meters of distance between them. It seems like those are polylines with less than 2 points.

Do you have a potential solution?

No response

Platforms

iPhone iOS 17.2.

Severity

Minimum: Allows normal functioning

Hi @enricostrijks!
Would you be able to provide a simple set of polylines where you experience those unexpected interactions?

Hi @enricostrijks!

Would you be able to provide a simple set of polylines where you experience those unexpected interactions?

Hi @monsieurtanuki ,

It's hard to do so.. it only happens when its being drawn by the code. Once you put in a set of Polylines hardcoded or later on, the issues dissapears so its not easy to reproduce let alone to fix it :(. If I can do anything else for you please let me know!

commented

This sounds a bit like you're doing something wrong with your polyline building maybe ? Look into things like if you are resetting the list of points each time, or adding to a list repeatedly and things like that. You can dump each list of points, and try and recreate them with a test example to see if the list makes sense.

This sounds a bit like you're doing something wrong with your polyline building maybe ? Look into things like if you are resetting the list of points each time, or adding to a list repeatedly and things like that. You can dump each list of points, and try and recreate them with a test example to see if the list makes sense.

@ibrierley don't think I'm doing something wrong, but surely will try some things! Will let you know what I've found!

commented

feel free to post the polyline code where you create them as someone may spot something.

I'm going to close this for now, as there's a lot of unknowns here, and I feel like there's a big jump in reasoning to say there's a bug in FM.
If you can post the code and prove there's no issue there, I'll be happy to re-open this!

@JaffaKetchup Probably found the issue. Working on it, expected to have an answer on whether or not it is my code that creates the error by wednesday. Im suspecting that, its due to polylines with only 2 points and those 2 points are exactly the same coords and then add a lot of them.