calculating area of user defined polygon
My objective is to make a tool to calculate the area of any user defined polygon on the map using a python code. One way I see to achieve this is:
1. Open a map and select points on the map which will be the vertices of the polygon
2. export the lat long of these vertices into a python code which will calculate the area of the polygon
3. Integrate this python code into the map so that the area which is the output of the python code is displayed on the map?
Can this can be achieved using openstreetmap? How do I go about it?