We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to measure a wall, unfortunately, the lines are displayed outside the map and not where I clicked
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);
The text was updated successfully, but these errors were encountered:
I think for this to work with overlays you'd need to set the bounds to proper geographic coordinates.
L.imageOverlay expects a LatLngBounds object to be passed in, but you're just passing in the pixel size of the image in your imageBounds variable.
Once Leaflet knows how to place your image then you should be able to measure off it.
Sorry, something went wrong.
No branches or pull requests
I tried to measure a wall, unfortunately, the lines are displayed outside the map and not where I clicked
This is how I create my map
The text was updated successfully, but these errors were encountered: