目前找Layer的方法有幾種
1.透過名稱
UIView<AGSLayerView>* lyrPushCaseView = [self.mapView.mapLayerViews valueForKey:@"住宅推案 ];
AGSLayer* pushCaseLayer = lyrPushCaseView.agsLayer;
if ([pushCaseLayer isKindOfClass:[AGSDynamicMapServiceLayer class]]) {
lyrPushCaseView.hidden = NO;
}
2.透過Index
NSArray *layerLists = [delegate.mapView mapLayers];
AGSDynamicMapServiceLayer *layerGroup = [layerLists objectAtIndex:2];
沒有留言:
張貼留言