Leaflet.PolylineMeasure icon indicating copy to clipboard operation
Leaflet.PolylineMeasure copied to clipboard

Doesn't work with image overlays

Open vondermanzen opened this issue 11 months ago • 1 comments

I tried to measure a wall, unfortunately, the lines are displayed outside the map and not where I clicked

image

image

This is how I create my map

var map = L.map('map', {
crs: L.CRS.Simple,
attributionControl: false,
noWrap: true,
continuousWorld: true, 
minZoom: -5,
zoomDelta: 0.2,
zoomSnap: 0.2,
wheelPxPerZoomLevel: 300
});

// Add a custom .bmp image layer
var imageBounds = [[0, 0], [size.height, size.width]];
L.imageOverlay(imageUrl, imageBounds, {
noWrap: true,
continuousWorld: true
}).addTo(map);

// Fit the bounds to the image size
map.fitBounds(imageBounds);
map.setZoom(0); 



options = {
position: 'topleft',            // Position to show the control. Values: 'topright', 'topleft', 'bottomright', 'bottomleft'
};

L.control.polylineMeasure(options).addTo(map);

vondermanzen avatar Mar 20 '24 13:03 vondermanzen