Topic: Displayed area size in meters?

I've written a shader that displays a grid on top of the online map in Unity. I would like to be able to set this grid to display lines every five meters, regardless of the current map zoom factor.

What would be the best way to retrieve the currently displayed area size in meters for the selected zoom factor?

Re: Displayed area size in meters?

Hello.

Use OnlineMapsUtils.DistanceBetweenPoints to calculate the distance between the corners of the map (OnlineMaps.topLeftPosition and OnlineMaps.bottomRightPosition).
http://infinity-code.com/doxygen/online … bc84a165f2

Example of using DistanceBetweenPoints:
http://infinity-code.com/atlas/online-m … ample.html

Kind Regards,
Infinity Code Team.

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

Re: Displayed area size in meters?

Thanks for the help!

I did end up using DistanceBetweenPoints, but with lat/long positions I got from getCoordsFromWorldPosition. Your solution is much more elegant.