i'm trying to measure distance using the measure example.
but the difference is that i'm displaying an image using iiifimage like this example
I also have a scale line on my map which working well (after setting the projection below on my map).
const projection = new Projection({
code: 'ZOOMIFY',
units: 'PIXELS',
metersPerUnit,
extent: [0, 0, options.size[0], options.size[1]],
getPointResolution: a => a
});
With my measure tool , in order to get the length of my feature i'm doing this :
const length = getLength(geom, { projection: map.getView().getProjection() });
Unfortunately, my measured distance is totally wrong (compared to my scaleLine and my real image).
What am i doing wrong ?
Thanks a lot.