Closed johnd0e closed 4 years ago
Just drawn circle can be edited without problems.
Correction: 'without exceptions'. Editing itself is not OK, as it lacks outer handler (to change radius).
Perhaps the issue came from difference between
L.Circle
andL.Geodesic.Circle
implementations.
Yes, I replaced in https://github.com/IITC-CE/ingress-intel-total-conversion/blob/256f9c53a866a254b40e40b1f766e58b4d2a89f4/plugins/draw-tools.user.js#L254
L.geodesicCircle
to L.circle
And that solved problem. Exception does not happen, center of circle can be moved.
up: In original, geodesicCircle
should be curved near Earth's poles, but this does not happen.
up: In original,
geodesicCircle
should be curved near Earth's poles, but this does not happen.
I have even more bad news: Using old draw-tools the GeodesicCircle is like this:
But using our current draw-tools (with updated Leaflet.draw) the shape is completely wrong (ellipse).
Just drawn circle can be edited without problems. But after we reload page and press edit button - there is exception.
Source is https://github.com/Leaflet/Leaflet.draw/blob/develop/src/edit/handler/Edit.Circle.js#L19 Restored shape does not have
_radius
property.Real circle radius is stored in
_mRadius
property, so_radius
perhaps is something other. (New-drawn circle has_radius
property, that's why we can edit it)Perhaps the issue came from difference between
L.Circle
andL.Geodesic.Circle
implementations.