How to compute distance between two spherical Mercator points

by ericg   Last Updated May 15, 2019 21:22 PM

I am computing the Mercator points according to the top answer at Convert latitude/longitude point to a pixels (x,y) on Mercator projection.

Now that I have two Mercator points on a spherical projection, how do I compute the distance between them?

For some background, what I am attempting to do is implement the answer at How to calculate the optimal zoom-level to display two or more points on a map and am stuck at step #2 where I need to compute the distance.

Related Questions

Updated September 14, 2016 08:09 AM

Updated October 16, 2017 16:22 PM

Updated January 16, 2018 22:22 PM

Updated November 16, 2018 17:22 PM