At the moment I am working on an OpenLayers project or rather I am learning on a project.
I stumbled upon a feature:
When you click on a polygon on the OpenLayers map and that plygon is selected and marked, I would like you to bring me from PostGis or calculate openlayers the size of the sides of the polygon one by one and pass them on that line in "m "..
geometry coordinates:
flatCoordinates: Array (12)
0: 3024661.117360038
1: 5657480.092961456
2: 3024466.963703795
3: 5656972.883250752
4: 3024488.1992827402
5: 5657122.118405258
6: 3024485.744880199
7: 5657251.372586279
8: 3024551.9375920547
9: 5657592.494035185
10: 3024661.117360038
11: 5657480.092961456
length: 12
I tried something after a long search on this forum and I found this:
feature.getGeometry (). getArea ()
but it only returns a number to me, not an array with all the sides of points A-B, B-C, C-D and so on.
Here I would ask for your help ...