Possible Duplicate:
Unproject Radius with Openlayers with CRS:84 Projection
I allow a user to draw a circle in Openlayers.
I created an alert to show the radius of the circle.
I now need to convert the radius to kilometers.
For example 0.001788057579325097 (How many kilometers is this)
How do I change this to kilometers? I think its just the decimals that is the problem.
// The Drag function is now made and called
// Add Drag
drag = new OpenLayers.Control.DragFeature(polygonLayer, {
autoActivate: true,
onComplete: displayRadius
});
function displayRadius(circle) {
var area = circle.geometry.getArea();
var radius = 0.565352 * Math.sqrt(area);
alert(radius);
}
...maxResolution: 156543, units: 'm', projection: "EPSG:41001"...