The capability to measure distances or areas is an important thing on many GIS applications.
In this recipe, we are going to see in action what the Measure control in OpenLayers offers to the developer.
The application will show a simple map with some buttons on top, as shown in the following screenshot. The Measure toggle button activates or deactivates the control, while the radio buttons bring us the possibility to select what to measure: a path or an area:
In addition, we can set two control options. The Geodesic control indicates if the distance of the area computation must be in geodesic metrics instead of planar. ...