Skip to content
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

transform polygons and polylines to custompaint #693

Closed
X-SLAYER opened this issue Jul 19, 2020 · 8 comments
Closed

transform polygons and polylines to custompaint #693

X-SLAYER opened this issue Jul 19, 2020 · 8 comments

Comments

@X-SLAYER
Copy link

is there any way to transform a polygon to a path or custom paint and draw it inside any widget
something like that

image

@X-SLAYER X-SLAYER changed the title transform polygons and polylines transform polygons and polylines to custompaint Jul 19, 2020
@ibrierley
Copy link
Collaborator

Just pondering, what's the use case ? It should be possible, but often the devil is in the detail.

@X-SLAYER
Copy link
Author

X-SLAYER commented Aug 5, 2020

just let's say that I want to show all my polygons in another listview or something like that, I want to show each polygon in a custom widget lets say something like this
image

@ibrierley
Copy link
Collaborator

Assuming you have the original poly that you passed to flutter_map, could you project the latlongs with options.crs.latLngToPoint(latlng, zoom); (may need to dig out the code in map.dart) divide by 2^zoom and then adjust with the min/max bounds of that, to fit in whatever canvas you are creating ?
Just thinking off the top of my head how I would look to approach it.

@X-SLAYER
Copy link
Author

X-SLAYER commented Aug 5, 2020

i already tried this one but its showing blank i used this method
#385

@ibrierley
Copy link
Collaborator

ok, so start with a test list of Offsets, can you show the code you are trying to get it displayed, that may give some clues?

@X-SLAYER
Copy link
Author

X-SLAYER commented Aug 6, 2020

sorry, I already deleted my code for that but it's based on the same method u had told me

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Mar 21, 2021
@github-actions
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants