In a larger (tab driven) project I'am adding all stuff to L.Layergroup for easy managing the Layers.
If I'm using
this.Map.editTools.startCircle()
then the circle will automatically added to map.
I', looking for a solution to add the circle to my own Layer like
this.Map.editTools.startCircle({target: myLayer})
Any inspirations?
Edit:
This
startCircle: function (latlng, options,target) {
latlng = latlng || this.map.getCenter().clone();
var circle = this.createCircle(latlng, options);
if (!target) target = this.map;
circle.enableEdit(target).startDrawing();
return circle;
},
doesnt work, because later (in L.Editable.CircleEditor) the lib try to use this.map.project and this fails
In a larger (tab driven) project I'am adding all stuff to L.Layergroup for easy managing the Layers. If I'm using
this.Map.editTools.startCircle()
then the circle will automatically added to map. I', looking for a solution to add the circle to my own Layer likethis.Map.editTools.startCircle({target: myLayer})
Any inspirations?Edit: This
doesnt work, because later (in
L.Editable.CircleEditor
) the lib try to use this.map.project and this fails