-
-
Notifications
You must be signed in to change notification settings - Fork 856
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
FYI: New plugin for showing popups #590
Comments
nice ! just make a pull request to add this plugin to README |
@rorystephenson Thumbs up. I was searching for marker popups too a few weeks ago. I found an issue and used the Would be nice to have a generic marker popup plugin yes. |
@mat8854 I remember reading the same issue and it helped a lot! It depends on what your requirements are. In my case I wanted a solution that:
So thanks for reminding me of that issue, I'm going to retry some of those solutions. |
@rorystephenson So for a truely generic plugin there are many little details like:
Would be nice to cover them. The Tooltip is not perfect for that. We noticed that too. Will wait for the PR. |
@mat8854 I published a big update which now means proper widget popups without a predefined size are supported and the options you've specified are easy to add. I'd hesitate on adding too many options until people ask for them to avoid unnecessary code. The way it's written it is a replacement for the original MarkerLayer (I copied a lot of the code), with added popup support. That ended up being a far cleaner and flexible implementation. I'd be happy to open a PR to add it directly to this package or it can be left as a separate plugin, that's up to the authors of this package. If integrating it in to this package is preferred there are a couple of options:
|
Update: I opened a PR to add popups to the clustering plugin and created a fork which contains the plugin (which I plan to remove when the main repo is updated). See the bottom of the first comment for details. |
When I click on a Marker and then click on another Marker it keeps the information from the previous marker in Popup. To update the information you need to click on the map and then click on the Marker. I tried to solve it by calling hide before the change but it doesn't work.
|
Thanks for reporting that @kekeu, I will track it on the issues for the plugin here: rorystephenson/flutter_map_marker_popup#4 EDIT: This has now been fixed! |
Note @kekeu and others interested the bug where state was not changed when moving from one marker to another has been fixed and published in 0.1.4. |
Thanks. It was very good. It works perfectly. |
Hi @rorystephenson , Thanks a lot for your plugin it works perfectly! I was looking for this for a while now and I could figure out how to do it myself as I am pretty new to Flutter. |
Thank you for taking the time to give such positive feedback and for sharing your example, I will have a look! I'm really glad the plugin is useful. |
Hi, I just saw this plugin and tested it. Works great! However, I have question: It is not clear to me how to create a specific popup for each marker. Is there a possibility to append a widget or a text to a marker? Currently I have:
This works fine, because Thanks in advance! |
You can use a variable to store the value. And every time you click on the popup it sets the value you want. When the popup is built it will have the information.
In build of the Marker
|
Ah yes, of course! I missed this. Thank you! |
Love the popup marker plugin, but I have issues with your clustering since it depends on flutter map 0.8.2 and the rest of the plugins I use depends 0.9.0. Any chance you could change dependency to 0.9.0 as well? |
Hi @Engelbrekt39. Thanks I'm glad to hear you like the plugin! What package are you using and which version? The latest versions of Pubspec of Pubspec of |
Hey @rorystephenson I was trying to use your markercluster from git mentioned in your original post, which caused the error. I was not aware I could get the popups yo work nicely with the original marker cluster plugin which worked without any errors. |
Closing as this was just an FYI and the plugin has been added to the README |
I'm an extremely happy user of this package and as a (very) little thank you I packaged up some code I wrote to show tappable popups on the map.
I wrote it specifically for my purposes so it's definitely far from perfect but I'm very open to suggestions/PRs in order to improve it. A sneak peek (the popup Widget is my own, just a Card with some extra touches, happy to share if anyone wants):
You can find it on:
It's in its early stages and is likely to change, things that I would like to improve but haven't gotten around to yet:1. Allow dynamically sized popups, currently the size is fixed and the widget returned by the popupBuilder must respect that size.2. Document an example of using this with a marker clustering layer. This is how I use it myself and it works well.3. Prevent the user from needing to dispose of the PopupController themselves.EDIT:
After a lot of experimenting I came up with a much cleaner approach that allows dynamically sized proper widgets to be used for markers and doesn't required the user to dispose of the PopupController themselves. The catch is that it won't work as-is with the clustering plugin so I have instead:
You should change
master
to the commit hash if you don't want it to update whenever I push a change! Alternatively make your own fork.The text was updated successfully, but these errors were encountered: