<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem with editing AGSFeatureLayer created in offline mode in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389808#M3340</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm experimenting with online-offline editing of a feature layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In online mode, the feature layer is created from a feature service hosted on ArcGIS Online. And I can click on the accessory button to edit the feature attributes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In offline mode, I save layer defintion from [aFeatureLayer encodeToJSON] into a file and then recreate a new feature layer from the saved layer defintion as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[self initWithLayerDefinitionJSON:featureLayerDefinition featureSetJSON:featureSetDictionary];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After that, the AGSPopupsContainerViewController doesn't allow me to edit the feature attributes. I've tried to fix the problem as follows but it doesn't seem to work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPopupInfo *info = [AGSPopupInfo popupInfoForGraphic:graphic];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPopup *popup = [AGSPopup popupWithGraphic:graphic popupInfo:info];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; popup.allowEdit = YES;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; popup.allowDelete = YES;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; popup.allowEditGeometry = YES;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.popupVC = [[AGSPopupsContainerViewController alloc] initWithPopups:[NSArray arrayWithObjects:popup, nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is above the expected behaviour of a feature layer? Is there anyway to configure AGSPopupsContainerViewController for editing in the offline mode?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rgds&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ong CF&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Sep 2012 06:54:49 GMT</pubDate>
    <dc:creator>c_f_ong</dc:creator>
    <dc:date>2012-09-28T06:54:49Z</dc:date>
    <item>
      <title>Problem with editing AGSFeatureLayer created in offline mode</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389808#M3340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm experimenting with online-offline editing of a feature layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In online mode, the feature layer is created from a feature service hosted on ArcGIS Online. And I can click on the accessory button to edit the feature attributes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In offline mode, I save layer defintion from [aFeatureLayer encodeToJSON] into a file and then recreate a new feature layer from the saved layer defintion as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[self initWithLayerDefinitionJSON:featureLayerDefinition featureSetJSON:featureSetDictionary];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After that, the AGSPopupsContainerViewController doesn't allow me to edit the feature attributes. I've tried to fix the problem as follows but it doesn't seem to work. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPopupInfo *info = [AGSPopupInfo popupInfoForGraphic:graphic];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSPopup *popup = [AGSPopup popupWithGraphic:graphic popupInfo:info];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; popup.allowEdit = YES;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; popup.allowDelete = YES;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; popup.allowEditGeometry = YES;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.popupVC = [[AGSPopupsContainerViewController alloc] initWithPopups:[NSArray arrayWithObjects:popup, nil]];&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is above the expected behaviour of a feature layer? Is there anyway to configure AGSPopupsContainerViewController for editing in the offline mode?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rgds&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ong CF&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Sep 2012 06:54:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389808#M3340</guid>
      <dc:creator>c_f_ong</dc:creator>
      <dc:date>2012-09-28T06:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with editing AGSFeatureLayer created in offline mode</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389809#M3341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've dug further as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- (void)didLoadLayer:(AGSLayer *)layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if ([layer isKindOfClass:[AGSFeatureLayer class]])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSFeatureLayer *aFeatureLayer = (AGSFeatureLayer *)layer; // feature service layer loaded in by web map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"1: canCreate %@", aFeatureLayer.canCreate ? @"YES" : @"NO");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSFeatureLayer *fL = [[AGSFeatureLayer alloc] initWithLayerDefinitionJSON:[aFeatureLayer encodeToJSON] featureSetJSON:nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"2: canCreate %@", fL.canCreate ? @"YES" : @"NO");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the output is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1: canCreate YES&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2: canCreate NO&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea as why the difference in the above output? And for the second case, is there a way to configure the feature layer to output canCreate YES instead?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rgds&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ong CF&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2012 03:14:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389809#M3341</guid>
      <dc:creator>c_f_ong</dc:creator>
      <dc:date>2012-09-29T03:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with editing AGSFeatureLayer created in offline mode</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389810#M3342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did more digging...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSFeatureLayer *aFeatureLayer = (AGSFeatureLayer *)layer; // feature service layer loaded in by web map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NSLog(@"aFeatureLayer JSON %@", [aFeatureLayer encodeToJSON]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NSLog(@"1: canCreate %@", aFeatureLayer.canCreate ? @"YES" : @"NO");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;AGSFeatureLayer *fL = [[AGSFeatureLayer alloc] initWithLayerDefinitionJSON:[aFeatureLayer encodeToJSON] featureSetJSON:nil];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NSLog(@"fL JSON %@", [fL encodeToJSON]);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;NSLog(@"2: canCreate %@", fL.canCreate ? @"YES" : @"NO");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Comparing the 2 JSON outputs and the difference seems to be as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;aFeatureLayer: editable = true;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fL: editable = false;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this reason for "1: canCreate YES" vs "2: canCreate NO"? Why? Anyway to make fL editable?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rgds&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ong CF&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2012 15:33:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389810#M3342</guid>
      <dc:creator>c_f_ong</dc:creator>
      <dc:date>2012-09-29T15:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with editing AGSFeatureLayer created in offline mode</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389811#M3343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Same issues here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am replying to bump this question back to the top.&amp;nbsp; I am having the same issues with not being able to edit feature layers created with the:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-(id)initWithLayerDefinitionJSON:(NSDictionary*)layerDefinitionJSON featureSetJSON:(NSDictionary*)featureSetJSON;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I noticed the same JSON output results as the original poster.&amp;nbsp; My AGSPopupsContainerViewController is configured to allow edits but this does not seem to work on feature layers created with the JSON parse.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone had any success editing features that were created this way?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 03:45:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389811#M3343</guid>
      <dc:creator>deleted-user-4bdbdJY7UQ_i</dc:creator>
      <dc:date>2012-12-13T03:45:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with editing AGSFeatureLayer created in offline mode</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389812#M3344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One more try at getting a response from ESRI on this issue.&amp;nbsp; I still have not found a solution to this problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jan 2013 19:17:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/problem-with-editing-agsfeaturelayer-created-in/m-p/389812#M3344</guid>
      <dc:creator>deleted-user-4bdbdJY7UQ_i</dc:creator>
      <dc:date>2013-01-16T19:17:39Z</dc:date>
    </item>
  </channel>
</rss>

