How to find the area of a feature in OpenStreetMap, using overpass api and javascript

المشرف العام

Administrator
طاقم الإدارة
I am creating a calculator and I would like to know the area of parks/water bodies in a specific area. This would have to be dynamic. I have successfully requested all the features I need using the overpass api, but now I'm having a hard time figuring out how to calculate the areas of these features. Here's a link to my website http://olympicsaroundtheworld.com/contact.html

This is the part where I'm struggling.

var click = new OpenLayers.Control.Click( "http://overpass-api.de/api/interpreter?data=" + "[timeout:5][out:json];" + "(node(bbox);way(bbox););(._;
 
أعلى