<?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 Re: FeatureLayer dataChanged fails. in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190664#M1760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is kind of old but what the heck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the spatial reference of the first layer added to the mapView the same as the feature layer you add afterwards? Or perhaps I am misunderstanding.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, you mentioned that you remove the feature layer and then add it back in to get the features to display at the correct location. And, if you don't remove/add your features, they show up at 0,0. I did not see the remove/add operation in your code. You don't have to share this but I am interested since this is similar to a problem I am having with AGSGraphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Paul Lohr&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Sep 2011 10:42:04 GMT</pubDate>
    <dc:creator>PaulLohr</dc:creator>
    <dc:date>2011-09-14T10:42:04Z</dc:date>
    <item>
      <title>FeatureLayer dataChanged fails.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190662#M1758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So far I've tried to refresh the FeatureLayer after I apply edits to it by calling &lt;/SPAN&gt;&lt;STRONG&gt;dataChanged&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp; The point gets added at Lat/Lon of 0/0, instead of at the correct location.&amp;nbsp; If I remove/add the layer to the mapView, it shows up in the correct location.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSFeatureLayer *flayer = (AGSFeatureLayer*)theLayer;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSArray *types = flayer.types;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSFeatureType *theType = [types objectAtIndex:0];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSArray *templates = theType.templates;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSFeatureTemplate *theTemplate = [templates objectAtIndex:0];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSGraphic *theFeature = [flayer createFeatureWithTemplate:theTemplate];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [theFeature.attributes setValue:message forKey:@"Description"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [theFeature setGeometry:[AGSPoint pointWithX:longitude y:latitude spatialReference:[AGSSpatialReference wgs84SpatialReference]]];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSOperation *result = [flayer addFeatures:[NSArray arrayWithObject:theFeature]];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [flayer dataChanged];
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, I tried in the class where I implemented AGSFeatureLayerEditingDelegate...&amp;nbsp; Still no joy.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
- (void)featureLayer:(AGSFeatureLayer *)featureLayer operation:(NSOperation *)op didFeatureEditsWithResults:(AGSFeatureLayerEditResults *)editResults {
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSArray *addResults = editResults.addResults;
&amp;nbsp;&amp;nbsp;&amp;nbsp; AGSEditResult *addResult = [editResults.addResults objectAtIndex:0];
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(addResult.success) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [featureLayer dataChanged];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mICATViewController *ref = [mICATViewController sharedManager];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ref.image != nil) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *filename = [ref.imagePickerDelegate saveImageToTempFile:ref.image];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [featureLayer addAttachment:addResult.objectId filepath:filename];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [ref setImage:nil];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"UGH. NOW WHAT");
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas????&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2011 22:02:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190662#M1758</guid>
      <dc:creator>MichaelMurphy8</dc:creator>
      <dc:date>2011-05-24T22:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer dataChanged fails.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190663#M1759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To follow up:&amp;nbsp; I was able to specify set&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
featureLayer.expirationInterval = 30;
featureLayer.autoRefreshOnExpiration = YES;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But this is kind of kludgy.&amp;nbsp; If I'm successful in adding the feature, it should get updated immediately on the client without having to wait for the timer to expire.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:35:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190663#M1759</guid>
      <dc:creator>MichaelMurphy8</dc:creator>
      <dc:date>2021-12-11T09:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer dataChanged fails.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190664#M1760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is kind of old but what the heck.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is the spatial reference of the first layer added to the mapView the same as the feature layer you add afterwards? Or perhaps I am misunderstanding.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, you mentioned that you remove the feature layer and then add it back in to get the features to display at the correct location. And, if you don't remove/add your features, they show up at 0,0. I did not see the remove/add operation in your code. You don't have to share this but I am interested since this is similar to a problem I am having with AGSGraphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Paul Lohr&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Sep 2011 10:42:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190664#M1760</guid>
      <dc:creator>PaulLohr</dc:creator>
      <dc:date>2011-09-14T10:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer dataChanged fails.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190665#M1761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is in response to madgame's original post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm wondering if geometry of the new feature being added is NOT in the same spatial reference as the map. I notice that in the code he is explicitly assigning WGS84 to the feature's geometry, and this should be okay if the map is in WGS84 too.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Else, the lat/long values should be projected into the map's spatial reference (using AGSGeometryEngine) and then the projected values should be used with the feature's geometry. Ofcourse, the feature's geometry's spatial reference should be set to the map's spatial reference too.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 22:31:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190665#M1761</guid>
      <dc:creator>DiveshGoyal</dc:creator>
      <dc:date>2011-09-16T22:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureLayer dataChanged fails.</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190666#M1762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This makes sense, Nimesh.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;madgame,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is the URL of the REST endpoint for the first layer that is added to the map? I think this will help us determine if we are talking about a spatial reference issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Sep 2011 15:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/featurelayer-datachanged-fails/m-p/190666#M1762</guid>
      <dc:creator>PaulLohr</dc:creator>
      <dc:date>2011-09-19T15:02:16Z</dc:date>
    </item>
  </channel>
</rss>

