-
The app I'm working on has the following user requirements:
Have I missed something in the examples/docs/code? If so, would you mind providing me some pointers? Btw. I'm happy to see there is much more activity in this fork than in the original/official repo. Thank you for your efforts! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 6 replies
-
It's actually not a fork but written completely from scratch. 😄 But this means that some functionality might be not implemented yet.
Annotations like markers have currently no gesture events or callbacks yet. In the meantime, you can listen for those events on the map and use queryLayers() for the touched point. Then, you can iterate though your markers to find the one that is closest to the touched point. It's very manual, but this interactive annotations are planned in the future for sure.
The MapEventLongClick event exists, though it's currently only supported on android. There is only little documentation here: https://flutter-maplibre.pages.dev/docs/events#available-events definitely something to improve on. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the bad assumption on my part. Even more kudos to you...
I've tried that, but the MarkerLayer is never found. Only countries-fill, countries-boundary, coastline. Or is that because I add the MarkerLayer inside the
That would mean a Marker can be selected even when remotely clicked on the Map. I only want the marker to be selected when clicked on top of it. I therefor create a Polygon for the Marker and test if the mouse location is inside it using Workaround
|
Beta Was this translation helpful? Give feedback.
-
Not sure what you mean by that... Do you mean: "In case you have only a few widgets to show, [..]"?
That's one of the first options I tried:
In none of these options a Tap is detected because for some reason, all child widgets are wrapped in a single I just wonder why interaction with widgets inside the WidgetLayer is supposed to be silenced? It is called a "Widget" layer which is added to the |
Beta Was this translation helpful? Give feedback.
-
I've added interactivity to WidgetLayer:
Would you like me to create a PR? I've also created a rough Example that allows:
Are you interested in this Example? In that case I will polish it and create a separate PR. |
Beta Was this translation helpful? Give feedback.
-
I didn't expected the behaviour either... But that's where Have a look at this simple example: https://dartpad.dev/id=f24d1526506adb2bf2fa975107b90f95 FutureBuilder connectionState:
I tried to solve the issue using |
Beta Was this translation helpful? Give feedback.
Sorry for the bad assumption on my part. Even more kudos to you...
I've tried that, but the MarkerLayer is never found. Only countries-fill, countries-boundary, coastline. Or is that because I add the MarkerLayer inside the
map.children
list?That would mean a Marker can be selected even when remotely clicked on the Map. I only want the marker to be selected when clicked on top of it. I therefor create a Polygon for the Marker and test if the mouse location is ins…