hermss

AGSPopupsContainerViewController

Discussion created by hermss on Sep 9, 2011
Latest reply on Sep 11, 2011 by hermss
Hi there
from FeatureLayerEditingSample. there is a part of code in FeatureLayerEditingSampleViewController.m
stating of initializing the popup view controller from a webmap
as below
//Iniitalize a popup view controller
self.popupVC = [[[AGSPopupsContainerViewController alloc] initWithWebMap:self.webmap forFeature:_newFeature usingNavigationControllerStack:NO] autorelease];

what do i do if i am to load this from a offline layer cache ?

i was able to modify the code so it actually uses the offlineonline method as below

        // Add feature layer
   
    self.OnOffLineLayer = [AGSFeatureLayer featureServiceLayerWithURL:[NSURL URLWithString:FEATURE_SERVICE_URL] mode:AGSFeatureLayerModeOnDemand];
    self.OnOffLineLayer = [OnlineOfflineFeatureLayer featureServiceLayerWithURL:[NSURL URLWithString:FEATURE_SERVICE_URL] mode:AGSFeatureLayerModeOnDemand];
    self.OnOffLineLayer.infoTemplateDelegate = self;
    self.OnOffLineLayer.outFields = [NSArray arrayWithObject:@"*"];
   

now if i could load the feature from the self.OnOfflineLayer it be great. but it just kick me off.

self.popupVC = [[[AGSPopupsContainerViewController alloc]  initWithWebMap:self.OnOffLineLayer forFeature:_newFeature  usingNavigationControllerStack:NO] autorelease];

Outcomes