Hi everyone, I have coded my app to upload longitudes, latitudes, titles, and descriptions to Firebase. Unfortunately, I can’t seem to figure out how to pull this information from Firebase and convert it into map markers. Could you please help me out? Here is my code to upload this information:
And here what Firebase looks like after a couple of markers were uploaded:
Your Firebase variable structure is a List of Objects. You need to use the "in list _ get _ " block to select (note first in list will be the ‘0’ entre and second is ‘1’… etc) and then use the “get property _ of object” block to extract the relevant values you wanted.
Thanks @gobassky for your response! I’m not sure I completely understand… This is what I coded to upload one map marker but it doesn’t seem to be working:
I think Firebase is unable to process one item of a list variable as your “get” block suggested. You might want to put Key as “map markers” as text. Then you use “in list _ get” and “get property object” blocks to extract the info you wanted.
Btw, if you use “cloud map markers” you do not need to use the “realtime db get” block. I will do something like this:
oops forgot to put the 1 X … latitude and 1 x long… presumably to convert from text to numbers.
Oh, okay. Thanks a lot for your help!