I'm the author of the geometry editing plugin leaflet.pm and I'm currently investigating a strange bug where editing a polygon sometimes won't update the bounds of the polygon even though the coordinates array changed.
I traced the issue down to two different functions I use to update the coordinates:
layer.setLatlngs().redraw();
and
layer._latlngs = [some new coords]
layer.redraw();
I guess the simple solution is to ALWAYS update a layers coords with setLatLng
- and I'm currently changing my code to do that.
I still want to ask - shouldn't redraw() also update the bounds? Because it is visibly changing the layers appearance to the new coordinates too?