Google maps and firebase , update markers

I’m making an app in which every time a user clicks on Google Maps a marker is added and the value is stored in firebase in json format .

When I delete an entry from firebase console is there a way to update the markers in the app ? I tried with the When firebase Data Changed Component with no luck . My thinking is when an entry is deleted from firebase console , all markers will be deleted from the map , the list should be updated with the remaining values and then call google maps to add again the remaining markers. Any help appreciated

2 Likes

when data changed then you are again using global json which has old data , why? if it have already stored old data then how it will show new data or delete items, when data changed then again call data and store

5 Likes

Thank you for your response I tried it but didn’t work. In order to find the solution I started testing steps one by one . First of all I wanted to see if a change in firebase (from console) triggers the data change block. So if I delete an entry in firebase console the data change block should trigger the del procedure and erase all markers, am I correct? Cause when I do it the markers are still on map.

Not not like this , use when data changed , use set global json to creat empty list then , Use as same as you used in Get value ,

3 Likes

Not working , see my blocks

image

Oh, you are deleting a bucket, then it needs to call get tags again when data changes call get tags, and set global json to empty

2 Likes

Thank you so much for your efforts to help me , this is not working either

image

2 Likes