I havenāt tried it. Perhaps Vini can jump in
Seems like itās the olā plug in needs to be visible to be initialized shenanigans. What do you think? @vini_brito
I can work around it by having one workflow to show the pop up and a separate workflow to initialize the map with a button click inside the pop up. The issue here is that you canāt have the map group hidden when loading the page. So if you want to swap between say a listing image and a mapview, you would have to stack the groups in Z and hide/show the listing image on top of the map. (I personally donāt like to stack groups in Z in bubble because it can create all kinds of issues.) Oh, and make sure you disable the button when the map is in view or remove the map when clicked a second time, if the button is clicked twice, it will throw the same error.
Orā¦ go with google maps and snazzy maps styling, and pay more if you go big.
edit: I take that back, that is a not a satisfactory solution. Since the map will be shown when you open the pop up a second time, so it would have to be removed on closing of the pop up, or the plug in will throw the same error when the map button is clicked in the re-opened pop up. (since the map already exists). And removing the map will require you to close the pop up with a workflow in order to run remove leafy map. Itās getting a bit too hacky hacky for my taste here, I will go with gmaps instead, all I really need is a marker on map anyway. Donāt get me wrong, this is a great plug in if you donāt need pop ups and multiple viewing options
Isnāt that working for you? Yeah, the map element must be visible for it to be initialized and loaded.
Hey vini,
Nope, running a workflow
Step 1. Show pop up - Step 2. Show map on leafymap
Throws the _initContainer error. Only way I can get it to work is with two separate workflows or adding a paus between step 1 and step 2 (to give it time to complete opening of the pop up before it runs the leafymap plugin. One of those times were bubble is actually too fast )
But as detailed in the post above, itās getting a bit hacky with showing/removing map when closing and opening pop ups. Great plug in tho. more of a bubble limitation.
Yeah indeed itās a race condition.
Have you tried using the āDo when a condition is trueā workflow event? Thatās the go-to solution for race conditions.
For example:
Do when condition is true -> Leafy Maps X is visible
[ Show map on Leafy Maps X ]
Yeah, tremble beneath my text drawing skills
haha nice.
Yeah, the problem is that āDo when condition is trueā workflow events doesnāt have access to the parent group. So I canāt pull parent groupās lat/long that way. My initial work around idea was to load the map on page load, then simply hide the ācoverā group when the button is clicked, but since I donāt have access to parent groupās lat/long this was a no go.
You can write it to a custom state.
Thatās true. I was toying with the idea of writing lat/long to a custom state when opening the pop up and pull it from there. But I had to move on, I ended up using google maps and a snazzy map that looks like mapbox, itās plug and play and all I need is a map with a marker. Had to move on to other things, but if I run into runaway costs with gmaps Iāll revisit this and set up mapbox.
But to be fair, I think gmaps comes with 25,000 api requests per month. It would mean thousands of users, if that happens, I will probably be paying more just to have the bubble servers keeping up
Oh, thatās good too!
ParabƩns Vini.
Ćtimo plugin, agradecemos por sua contribuiĆ§Ć£o.
Por gentileza, o LOCALIZE, no caso de ser um celular, e ser um webapps, se o usuĆ”rio fechar a tela, ele pegarĆ” a localizaĆ§Ć£o mesmo assim ?
Obrigado
Ainda nĆ£o testei, mas na forma que funciona outras coisas como por exemplo notificaĆ§Ć£o, se apagar a tela do celular ele nĆ£o rastreia mais.
NotificaĆ§Ć£o via navegador Ć© assim, apagou, parou de receber.
@vini_brito Very cool plugin, indeed. Amazing work.
Would your plugin also allow me to change data by moving the pin?
Letās say my data type āGrocery Storeā has the coordinates X and Y, based on an address I put in. I can see it on the map in that spot, where the address is. But sometimes, the pin isnāt exactly where I want it. So can I move it to a different location? (Say, if the entrance is at a different part of the building). And if so, would I be able to then set the new location as the actual address?
Not currently, but yes, that new feature can be implemented.
The feature needed would be the ability to drag a marker and read a dragged markerās new coordinates, then you set the new address to that coordinate and optionally use geocoding to get a human readable address based on that coordinate.
Everything else is in place already.
If it makes sense for your current context, you can sponsor the development of that new feature (: Iād send you a private message if interested.
Hey Vini,
I am trying to populate the weather details in the app for the polygon created. Is there any option that i can show the weather details of the polygon? I am thinking of dropping a marker in the middle of polygon created by the user or if there is any way to get weather details for the polygon created by the user, let me know how to do that. Basically, when a polygon is created, I am saving geojson but i donāt know how to extract lat longs from that or create a marker in the middle of the polygon for which i can get the weather details.
hey @vini_brito! this plugin is awesome. canāt tell you how much i appreciate it!
Two questions about potential feature upgrades:
custom icon - is there a plan to improve its accuracy in the future? I saw your note about how using a custom icon can result in misplacement on the map (I tested this and confirmed as well). Itād be great to serve different markers based on certain characteristics in my database.
Popups - is there a possibility to make this more customizable? Ideally, it would be helpful to be able to create this popup with multiple dynamic fields (text and images). I hacked together a solution in google maps (screenshot below) by centering the map every time a marker is clicked and sending data to a group, but the UX isnāt great. Itād also be helpful it the popup could be clickable and send data to another page in the URL. @boston85719 i saw you created a thread about funding for HTML updates to the popup. Any update there?
Iād be willing to contribute funds to improving this in the near future if itās on your roadmap. Would love to discuss.
Thanks again!
Jack
Hello folks!
@tishant61191
Weād need to expose the coordinate of the polygonās center (or centroid for the geometry lovers), and then you can get the weather data for that coordinate, for example a city. Itās currently not implemented, but if it makes sense for you or someone else to sponsor this, then it can be built.
Send me a private message if you want to see it built
@jack4
I can expose some fields to allow for tinkering to increase the accuracy of the marker, it is possible, yes, but itās not straightforward and this is why I left it out at first and only designed the recolored markers, these fields will require some tinkering and testing until your custom icon gets accurate.
Once you hit it fine with the custom icon, they work forever tho. And you can simply reuse other images with similar proportions and size with each ācalibration settingsā (I donāt have a better name yet ), the same way I reuse the recolored standard marker images.
About the custom popup, yeah, you could theoretically place an entire website, even more, a literal app in there, for example an iframe (a window) to a bubble app page and the user interact with it.
So yeah, it can be done, hasnāt been sponsored so far, so feel free to send me a private message if it makes sense for you to sponsor it
Hi @vini_brito I am wondering if there has been any workaround found for the issue regarding two maps being unable to be placed on the same page even if they have different unique IDs?
Right now I am experiencing an issue that I didnāt think Iād encounter as I am actually putting the two different maps into two different reusable elements, which are on the same page, however, they are contained in groups that are visible at different timesā¦but still get the issues faced when having two different maps on the same page.
These are the set ups for the two different maps in the separate reusable elements
The main issue I am facing is that after my page is loaded and the main map has been displayed, I click on a text element that changes the URLā¦this change in URL hides the group that contains the reusable element that holds the main map and then shows a group that contains another reusable element that holds a second mapā¦when this new group is shown, the map errors occurr:
It seems like the second action of Add marker has the error simply because of the first action of Show map has itās error, which seems to be based on the map container being initialized alreadyā¦my assumption here is that the plugin recognizes the map container as being initialized when my first main map was shown on page.
One thing I donāt understand though is that it doesnāt occur in the opposite direction. When my second group is shown on page load based on a user navigating through a URL that would show the second group on page load, and then they navigate to the main map, it loads correctly without issue, however, when they navigate back to the second map, it doesnāt load, but there is no error message in the debugger.
Here is a GIF of a video showing the issues I am seeing
I also get this error
which occurs after I have made an edit to the event location and the main map is displayed again after the edit has taken place.
Any ideas of how to workaround this?
In up to a few weeks Iāll have news on this, this issue isnāt gone from my tracker
@vini_brito love your plugins! This one will be so awesome once I get it working in my app.
I canāt seem to get this drawing a polygon working on the map. See GIF to show you what is going on. I would really like to get this working since it is going to be the main functionality of my app. Let me know if this helps:
I tried this on my Mac on Chrome and Safari as well as on my Boot-camped Windows 10 on Edge. Same issue. Am I missing something?
Thanks for your help! This plugin will be vital for my project.
Also, is there a way to save the polygons into my project after they create one? Or is that not available? Let me know. Thanks!
Yeah, thatās available (:
And about the bug, itās the third report about this issue on Mac (ah, Appleā¦) and itās on the list to be debugged, so fear not, whenever I have news Iāll be sharing about it (: