We can use latitude to convert coordinates into meters

I met Yelp Fusion API, which can find objects withing given radius around given location on Earth. Radius should be given in meters.

Simultaneously, Google Maps API uses degrees of latitude and longitude to report map bounds.

How to convert one to another so that provide meters to Yelp API? I realized, that this is pretty easy if we use latitude only:

EarthLatitude

Where alpha is latitude difference in radians.

To convert to degrees we should

2 * Pi / 360. *6371008.8 = 111195 meters per degree of latitude.

I wrote as simple JSFiddle here to illustrate this approach: https://jsfiddle.net/dimskraft/1boks8es/2/

Here is screenshot:

MetersPerDegree screenshot