Quantcast

Pmapper5 area measurement

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Pmapper5 area measurement

gioza
Hi,
I realised that using measure area tool in Pmapper5, the result is double of real surface (ex.: 10 instead of 5).
Adding the following code in custom.js:

OpenLayers.Control.PMMeasureArea.prototype.showMeasureResults =
function(evt) {
     console.log(evt);
}

I realised that the first point is always digitized twice even though I click once.
Has anyone experienced this?

Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Pmapper5 area measurement

gioza
I post the way I fixed the thing.

modify lines 175-176 of PM.Control.PMToolMeasure.js in this way:

showMeasureResults: function(evt) {
        var meas = evt.measure/2;
        $('#pmMeasureTotal').val(meas.roundTo(this.measureDecimals) + " " + evt.units + "²").css({width:'110px'});
    },

bye
Loading...