1.删除所有的坐标点
self.mapView.removeAnnotations(self.mapView.annotations)
2.删除折线
self.mapView.removeOverlays(self.mapView.overlays)
3.设置地图使其可以显示数组中所有的annotation, 如果数组中只有一个则直接设置地图中心为annotation的位置
self.mapView.showAnnotations(array, animated: true)
4.解决新版高德SDK拖动时坐标点出现抖动问题
此参数要在mapView初始化之前设置(切记,否则无效)
MAMapView.metalEnabled = true
网友评论