Issue with Uploading Markers from Firebase

In my app, I save marker longitudes, latitudes, titles, and descriptions to Firebase under the “marker” key. Below is my attempt at coding the map marker information taken from Firebase to load onto a map. Currently, my app is only uploading one map marker. How can I adjust my code to load all of the markers?

I suspect that there is a synchronous issues related to the asynchronous blocks that you used. For example, the first "J’ loop, before the Realtime_DB1 finished its process and execute the blocks within it, the loop have already gone to the next iteration of “J”. Hence in the end, you would only have one set of marker. You can do this with an recursive loop or another simple way is use the “cloud” type variable. The cloud variable essentially simplified the realtime_DB call and you may treat it just like any “app” variable.

Okay, thank you!

Hello @bobsunscreen!
Can you upload an image from your new blocks?

It would help me a lot!


Hi @dami_flepp, sure thing! I decided that using a cloud variable instead of Realtime_DB would be an easier way to store information to Firebase:

This way, map markers will be much easier to save and load up.

And I uploaded the Firebase data using this code:

I hope this helps; please let me know if you have any questions!

1 Like