如何从HereMap中删除所有地图对象?
HereMap SDK仅提供
- (BOOL)removeMapObject:(nonnull NMAMapObject *)object
- (BOOL)removeMapObjects:(nonnull NSArray<NMAMapObject *> *)objects
答案 0 :(得分:1)
你最有可能将NMAMapObject
添加到地图中,我建议创建一个添加到地图中的所有对象的可变数组,所以当你这样做时
//in viewDidLoad for instance create an empty NSMutableArray called mapObjects
[self.mapView addMapObject:self.mapRoute];
[mapObjects addObject:mapObject];
然后当你想删除它们时,你将能够做到:
[self.mapView removeMapObject:mapObjects];
如果这对您有用,请告诉我......