What behaviour I'm expecting and which behaviour I'm seeing
I use CRS.Simple draw a circle, I have the center coordinates and the radius(They're all in pixels) . Then I draw a cricle , I get a bigger circle. I know that L.cricle of radius in meters, so I use distanceTo get the distance between the two points and I use that as the radius. But the circle looks like have a bigger radius.
my code:
let point = {x: 100, y:200};// pixel
let radius = 50; // pixel
const crs = CRS.Simple;
const zoom = this.map.getZoom();
let cc = crs.unproject(point, zoom);
let pointOnCircle = crs.unproject({point.x + radius, point.y}, zoom);
let len = cc.distanceTo(pointOnCircle);
let layer = window.L.circle(cc, {radius: len});
layer.addTo(this.drawnItem); // this.drawnItem = new window.L.FeatureGroup();
Minimal example reproducing the issue
[ ] this example is as simple as possible
[ ] this example does not rely on any third party code
How to reproduce
What behaviour I'm expecting and which behaviour I'm seeing
I use CRS.Simple draw a circle, I have the center coordinates and the radius(They're all in pixels) . Then I draw a cricle , I get a bigger circle. I know that L.cricle of radius in meters, so I use
distanceTo
get the distance between the two points and I use that as the radius. But the circle looks like have a bigger radius. my code:Minimal example reproducing the issue