Select to view content in your preferred language

can't get URL from MapServiceInfo

616
0
02-25-2011 10:38 PM
LujunYuan
New Contributor
Hey all,

I am trying to get URL from MapServiceInfo. However, even when my map was initialized and loaded, the URL in MapServiceInfo was always nil.

Has anybody experienced the similar issue?

Here is my code. None of variables is nil, except serviceURL.

AGSDynamicLayerView *dynamicLayerView = (AGSDynamicLayerView *)agsLayerView;
NSLog(@"layerView = %@", dynamicLayerView.name); 
AGSDynamicMapServiceLayer *dynamicLayer = (AGSDynamicMapServiceLayer *) dynamicLayerView.agsLayer; 
mapServiceInfo = dynamicLayer.mapServiceInfo;  
NSURL *serviceURL = mapServiceInfo.URL; 

0 Kudos
0 Replies