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

How to remove a polygon. #102

Open
usmanzaheer1995 opened this issue Nov 29, 2017 · 2 comments
Open

How to remove a polygon. #102

usmanzaheer1995 opened this issue Nov 29, 2017 · 2 comments

Comments

@usmanzaheer1995
Copy link

How can i remove a polygon from map? polygon.removeFrom(map) does not work as it does for removing a marker.

@jflee1982
Copy link

I also need to solve the problem~! webgl earth has little api interface!

@rexxmagnus
Copy link

Very old, I know, but construct the polygon with a reference, then use the variable holding the polygon and call

var polygon = WE.polygon([.... coords ...], { }).addTo(earth);

polygon.destroy();
polygon = null;

You can then re-reference the polygon variable to create a new one.

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

3 participants