On map marker press

I am having an issue with the on marker press on the map. I have an app that maps the location of machines. When I press on the marker the information shows as does the picture from airtable. The problem happens when there are more than 1 machine in the same location which will happen all the time. If there are 2 or more machines in the same location (long and lat from airtable) the first press shows the correct information and picture however when you press the marker again you only get the updated information in the bubble but the picture does not change. I have tried all kinds of different blocks to get this to work but I have not had any luck. The link to my other post is below. If anyone can help me out I would be grateful! If you need more information I will be happy to provide as much as I can.

Thank you thunkable community!


In that older topic, the last screenshot you shared runs a loop through your database and sets the image to a picture filename based on a lat/lon match. But if you have multiple lat/lon pairs that match, it’s only going to set the image for the first match and then break out of the loop.

If you want to store both images and then display them, you’d have to put the resulting picture into a list. But I’m not entirely clear how you want to decide what to display if there are 2, 3, or 10 “machines” that match your lat/lon pair.

1 Like

@tatiang every time a marker is pressed it also shows the “job location” and “machine name” in the little bubble that shows when the marker is pressed. It cycles through the machines that are at that location every time the marker is pressed again. Is there a way we can use that to show the correct image? Those will always be different. This is all stored in an airtable database in different cells.