在 iPhone 上删除 MapKit 叠加层

7

我该如何在MapKit上移除所有的覆盖物?

2个回答

29

试试

[mapView removeOverlays: mapView.overlays];

对我而言是起作用的,请确保你使用了正确的方法,即mapView.removeOverlays(mapView.overlays),因为还有一个名为mapView.removeOverlay的方法。 - DogCoffee

4
[mapView removeOverlays:[mapView overlays]];

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接