Topic: How to return precise coords

Hello,

I'm testing the 2d marker controls,
When I add some markers on a googlemap by adding marker on click with api.control.GetCoords(), like :

OnlineMaps.instance.AddMarker(api.control.GetCoords(), null, "X");

On the map I see that the markers are placed at different pos, but when I try to get the precise lat & lng, with
print (api.control.GetCoords())
i get the same coords for markers nearby.

How can I have lat & lng not rounded by 2 decimals?

Re: How to return precise coords

Hello.

When you call:

print (api.control.GetCoords());

actually called Vector2.ToString(), that shows one decimal, but really it contains values with full accuracy (float).

You can check it:

Vector2 coords = api.control.GetCoords();
print (coords.x + " " + coords.y);

or

print (api.control.GetCoords().ToString("F4"));

Or you can use OnlineMapsControlBase.GetCoords (out double lng, out double lat), to get double-precision coordinates:
http://infinity-code.com/doxygen/online … 7644963fc6

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 return precise coords

oh okay. Understood.

Thanks again for your lighting speed answer smile