Search code examples
javascriptopenlayersopenstreetmap

In Openlayers how do i get the radius of a circle in miles?


I draw a circle on a map in Openlayers and i want to calculate the radius of a circle in miles and display it. How do I do this?


Solution

  • Here's how i ended up doing it.

    var measure = event.measure;
    var areaSquareMiles =  measure * 0.386102;
    var radius = 0.565352 * Math.sqrt(areaSquareMiles);