-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
使用数组循环渲染polyline组件,清除数组后发现polyline没有从地图中自动清除 #326
Comments
https://codesandbox.io/s/react-amap-example-react-17-forked-g2q3dn?file=/src/App.js |
@Lin47 升级到 |
@jaywcjlove Rectangle 也是同样的问题 |
升级到 v6.0.2, 不知道能不能解决你的问题 |
试了下不行。目前我是先自己参考您对polyline的修改本地封了下rectangle,统一用map.remove方法就能正常清除。 |
问题:我查看源码后发现在useEffect中设置polyline时并没有在卸载函数中清除掉polyline实例,请问是设计如此吗?
假如是设计如此,我希望手动控制清除polyline实例该怎么做?
The text was updated successfully, but these errors were encountered: