Hi guys, I want to change the visibility of a layer within a map service. From the documentation, it's clear to set AGSDynamicLayerView.visibleLayer with the array of visible layer ids. However, it doesn't seem working for me. Even when I manually zoom in/out the map afterwards, the new visibility doesn't change. Is there any other call I should make? I am using xcode 4.2 + iOS5 + AGS API 2.1.
AGSDynamicMapServiceLayer *dynLayer = (AGSDynamicMapServiceLayer *)dynamicLayerView.agsLayer;
NSMutableArray *visLayers = [NSMutableArray arrayWithCapacity:1];
// add some layers into visLayers
dynLayer.visibleLayers = [[NSArray alloc] initWithArray:visLayers];
Thanks,