Get coordinates from list of markers

Hey there!

I'm working on a GPS-based game for my daughter's school class. Now I’ve run into a problem:

I have several markers that I placed manually in the Map component (in the Designer), and I want to check in a method whether the user is within 50 meters of any of these markers.

blocks (6)

The issue is:
I want to access marker.Latitude and marker.Longitude, but I can’t change the loop variable to access these properties. The blocks don't let me plug get marker into Marker1.Latitude.

How can I properly get the Latitude and Longitude of each marker inside the loop?

Thanks so much for your help!

You need one of these for lat and another for long:


Assuming Riddle is from a list of Marker components, feed it Riddle instead of my sample marker.
The little pulldown can switch among marker attributes.

Check the Marker method blocks.

This sounds like something that can be done by a Marker block.

Sorry. You can not do that directly. You either need a global variable representative of those latitude and longitude coordinates or try something like recommended by abg.

See Social Distancing ... a CloudDB / Location Marker Tutorial
for making a facy app that will determine how far a marker is from another.

Now i got it! You can make generic Blocks, that was what i have missed. Thank you!

That was a better solution!

Thank you for that!