gpt4 book ai didi

ios - 在 ios 中从此处 map 清除多条路线

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:03:33 27 4
gpt4 key购买 nike

我正在像这样清除 HERE MAP,但它对我不起作用:

for (int i=0; i<self.NewMapRoute.count; i++)
{
self.route = self.NewMapRoute[i];

self.mapRoute = [NMAMapRoute mapRouteWithRoute:self.route];
[self.mapView removeMapObject:self.mapRoute];
}

之前我添加了这样的 map 路线。

for (int i=0; i<self.NewMapRoute.count; i++)
{
self.route = self.NewMapRoute[i];

self.mapRoute = [NMAMapRoute mapRouteWithRoute:self.route];
[self.mapRoute setColor:[arrycolor objectAtIndex:i]];
[self.mapView addMapObject:self.mapRoute];
}

最佳答案

您不能删除刚刚创建的 map 对象。对象是否使用相同的 route 创建并不重要。您需要引用之前添加的 NMAMapRoute。我在 NMAMapView 上没有看到用于获取已添加 map 对象的当前列表的 API,因此您可能必须自己管理此列表。

关于ios - 在 ios 中从此处 map 清除多条路线,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39849856/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com