Hello
Got it now. Need to set up (i.e. add AGSGraphicsLayer and other stuff) in didOpenWebMap as follows:
- (void)didOpenWebMap:(AGSWebMap *)webMap intoMapView:(AGSMapView *)mapView
{
// Once all the layers in web map are loaded
// Add AGSGraphicslayer on top
NSLog(@"didOpenWebMap");
[self setUpAfterOpenWebMap];
}
- (void)webMapDidLoad:(AGSWebMap *)webMap
{
NSLog(@"webMapDidLoad");
for (AGSWebMapLayerInfo *li in webMap.operationalLayers)
{
NSLog(@"title %@; layerId %@; layerType %@; mode %d; layers count %d", li.title, li.layerId, li.layerType, li.mode, [li.layers count]);
AGSPopupInfo *pi = li.popupInfo;
NSLog(@"title %@; description %@; allowEdit %@", pi.title, pi.description, pi.allowEdit);
for (AGSPopupFieldInfo *fi in pi.fieldInfos)
{
NSLog(@"fieldName %@", fi.fieldName);
}
}
}
Also, I've tried the following:
1. Set up web map with id = c14cef13d247471da5c0262db843c09e (my own web map)
Added a shapefile (SP_BDY_polyline) and configured pop-up
However, webMapDidLoad does not show AGSPopupInfo and AGSPopupFieldInfo as configured
2. For web map with id = b31153c71c6c429a8b24c1751a50d3ad (from Feature Editing sample)
webMapDidLoad shows AGSPopupInfo and AGSPopupFieldInfo as configured
Questions:
1. Any way for web map to treat my shapefile as a Feature Layer?
2. Is it necessary for web map to be based on a Feature Layer from a Feature Server for AGSPopupInfo and AGSPopupFieldInfo to be configured properly?
Thanks.
Rgds
Ong CF