我在新的应用程序中使用(非常酷)WhirlyGlobe(https://code.google.com/p/whirlyglobe/)iPhone全球3D显示屏。我可以使用下面显示的代码在特定位置添加标签。我希望能够回去并删除我之前添加的标签。文档(http://whirlyglobedocs.s3-website-us-east-1.amazonaws.com/html/interface_label_layer.html#ac17e1ec72e70eec416cb2cac833f46fa)显示了一个removeLabel方法,但我似乎无法让它工作。我可以添加但不删除标签。我尝试循环遍历所有子视图,但找不到这些SimpleLabel实例。有人可以帮助我了解如何删除标签吗?我没有多少运气找到很多例子。谢谢!使用WhirlyGlobe删除标签
// Current position
float lat = [[values objectAtIndex:8] floatValue];
flaot lon = [[values objectAtIndex:9] floatValue];
// Create a SingleLabel at this Lat/Lon pair location
SingleLabel *interimLabel = [[[SingleLabel alloc] init] autorelease];
interimLabel.text = [NSString stringWithFormat:@"PRN %d",[[values objectAtIndex:1] intValue]];
[interimLabel setLoc:GeoCoord::CoordFromDegrees(lon, lat)];
[locationArray addObject:interimLabel];
[allLabels addObject:interimLabel];
当然在数组allLabels?或者locationArray? Google代码页上的Wiki上是否有类似的帖子? – Luke
我可以看到代码将标签添加到图层的位置吗? – mousebird
下面的答案就像一个魅力 - 谢谢。 – PhilBot