Leaflet/Leaflet.Editable

Do not get the correct geometry

Closed this issue · 1 comments

Hi,
I can not get the correct layer geometry in your example/index.html. First click for create a new polygon return empty.

map.on('editable:drawing:click', function (e) {
	console.info(e.layer);  // _latlngs have one coordinate object
	console.info(e.layer.toGeoJSON().geometry.coordinates);  // return array with undefined
	console.info(e.layer.getLatLngs());  // return empty
});

Please help me

All right, i use editable:drawing:clicked