1 (edited by Rumata 2017-10-09 23:08:30)

Topic: How to get Latitude and longitude of 2D marker in the array?

Hello,
How can I get Latitude and Longitude of each marker as 2 float values, while through the array of 2D markers using:

foreach (OnlineMapsMarker marker in OnlineMaps.instance.markers.Where(m => m.tags.Contains("MyTag")))
        {
                        // float Lat = "LatitudeOfTheMarker";
                        // float Long = "LongitudeOfTheMarker"
                        // SomeFunction(Lat, Long);

        }

Thanks!

Re: How to get Latitude and longitude of 2D marker in the array?

Hello.

Vector2 pos = marker.position; // X - Longitude, Y - Latitude

or

double lng, lat;
marker.GetPosition(out lng, out lat);
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: How to get Latitude and longitude of 2D marker in the array?

Thank you very much, Alex Vertax!