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:

enter image description here

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,


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.