Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editables inside Layergroup #218

Open
Meirur opened this issue Jun 17, 2024 · 0 comments
Open

Editables inside Layergroup #218

Meirur opened this issue Jun 17, 2024 · 0 comments

Comments

@Meirur
Copy link

Meirur commented Jun 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant