How to calculate edge length of a feature and display the result on the corresponding edges in layer when clicking on that feature.
Looks like this:
This is my WMS layer:
var myLayer = new ol.layer.Image({
view: new ol.View({
projection: 'EPSG:4326'
}),
source: new ol.source.ImageWMS({
url: 'http://localhost:8081/geoserver/myDB/wms',
params: {LAYERS: 'myDB:myLayer', 'TILED': true},
serverType: 'geoserver',
ratio: 1,
}),
visible: true,
minZoom: 16,
});
map.addLayer(myLayer)
application/json
docs.geoserver.org/stable/en/user/services/wms/… OpenLayers has built in spherical methods to calculate length and area codesandbox.io/s/getfeatureinfo-image-forked-pfnq4v?file=/… there is no need for turf.js