<?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 Is there a way to allow a FeatureCollectionTable to update the geometry of existing features? in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39551#M428</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the ArcGIS Runtime SDK for .NET version 100.2. I am new to the SDK in particular and GIS in general. My goal is to take data from a locally available database with associated lat/long and show it on a map. When the database is updated with a new location, I get a push notification and I would like to update that feature on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a (contrived) example of what I would like to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;private async Task&amp;lt;Map&amp;gt; BuildAnUpdateableMap()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var map = new Map(Basemap.CreateTopographic());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var fields = new[] { new Field(FieldType.Text, "foo", "bar", 10) };&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var table = new FeatureCollectionTable(fields, GeometryType.Point, SpatialReferences.Wgs84);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var collection = new FeatureCollection(new[] { table });&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var layer = new FeatureCollectionLayer(collection);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var feature = table.CreateFeature();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; feature.SetAttributeValue(fields[0], "baz");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; feature.Geometry = new MapPoint(-119, 36);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; // Add the feature to the table. This works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; await table.AddFeatureAsync(feature);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; map.OperationalLayers.Add(layer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; // Update feature geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; feature.Geometry = new MapPoint(-119, 30);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; // Push the updated feature. This throws an exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; await table.UpdateFeatureAsync(feature);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; return map;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The initial feature and geometry shows up just fine but when trying to update the geometry, an exception is thrown:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;Esri.ArcGISRuntime.ArcGISRuntimeException: 'Ownership-based access control does not permit this operation on this feature.: allowGeometryUpdates=false'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can accomplish the update by first removing the feature from the table and then adding it again after updating the geometry but that results in an unsightly flicker (in the WPF control at least) and I expect that wouldn't scale well either.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there a way to update feature geometry with `FeatureCollectionTable`? Or do I need to use something different?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jan 2018 19:56:51 GMT</pubDate>
    <dc:creator>DanielCharles</dc:creator>
    <dc:date>2018-01-29T19:56:51Z</dc:date>
    <item>
      <title>Is there a way to allow a FeatureCollectionTable to update the geometry of existing features?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39551#M428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the ArcGIS Runtime SDK for .NET version 100.2. I am new to the SDK in particular and GIS in general. My goal is to take data from a locally available database with associated lat/long and show it on a map. When the database is updated with a new location, I get a push notification and I would like to update that feature on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a (contrived) example of what I would like to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;private async Task&amp;lt;Map&amp;gt; BuildAnUpdateableMap()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var map = new Map(Basemap.CreateTopographic());&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var fields = new[] { new Field(FieldType.Text, "foo", "bar", 10) };&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var table = new FeatureCollectionTable(fields, GeometryType.Point, SpatialReferences.Wgs84);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var collection = new FeatureCollection(new[] { table });&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var layer = new FeatureCollectionLayer(collection);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; var feature = table.CreateFeature();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; feature.SetAttributeValue(fields[0], "baz");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; feature.Geometry = new MapPoint(-119, 36);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; // Add the feature to the table. This works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; await table.AddFeatureAsync(feature);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; map.OperationalLayers.Add(layer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; // Update feature geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; feature.Geometry = new MapPoint(-119, 30);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; // Push the updated feature. This throws an exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; await table.UpdateFeatureAsync(feature);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; return map;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The initial feature and geometry shows up just fine but when trying to update the geometry, an exception is thrown:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;Esri.ArcGISRuntime.ArcGISRuntimeException: 'Ownership-based access control does not permit this operation on this feature.: allowGeometryUpdates=false'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can accomplish the update by first removing the feature from the table and then adding it again after updating the geometry but that results in an unsightly flicker (in the WPF control at least) and I expect that wouldn't scale well either.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there a way to update feature geometry with `FeatureCollectionTable`? Or do I need to use something different?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 19:56:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39551#M428</guid>
      <dc:creator>DanielCharles</dc:creator>
      <dc:date>2018-01-29T19:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to allow a FeatureCollectionTable to update the geometry of existing features?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39552#M429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since Geometry is immutable, you couldn't update the existing geometry. You may need to use GeometryBuilder class to update.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/net/latest/wpf/api-reference//html/T_Esri_ArcGISRuntime_Geometry_GeometryBuilder_1.htm" title="https://developers.arcgis.com/net/latest/wpf/api-reference//html/T_Esri_ArcGISRuntime_Geometry_GeometryBuilder_1.htm"&gt;GeometryBuilder(T) Class&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Jan 2018 18:37:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39552#M429</guid>
      <dc:creator>NagmaYasmin</dc:creator>
      <dc:date>2018-01-30T18:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to allow a FeatureCollectionTable to update the geometry of existing features?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39553#M430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response. I get that the Geometry object is immutable. I am actually setting the Feature to a new Geometry rather than changing the values in the existing object. That part compiles and runs fine. The issue is that when I go to update the FeatureCollectionTable I get a runtime error.&amp;nbsp; See the following snippet from the full sample above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; feature.Geometry = new MapPoint(-119, 36);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; // Add the feature to the table. This works fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; await table.AddFeatureAsync(feature);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; // Update feature geometry with a new object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; feature.Geometry = new MapPoint(-119, 30);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; // Push the updated feature. This next line throws an exception.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; await table.UpdateFeatureAsync(feature);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-family: terminal, monaco, monospace;"&gt;&amp;nbsp; &amp;nbsp; ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-family: terminal, monaco, monospace;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I expected that to work. Am I using FeatureCollectionTable incorrectly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 14:26:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39553#M430</guid>
      <dc:creator>DanielCharles</dc:creator>
      <dc:date>2018-01-31T14:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to allow a FeatureCollectionTable to update the geometry of existing features?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39554#M431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I posted the same question on&amp;nbsp;&lt;A href="https://gis.stackexchange.com/questions/269607/is-there-a-way-to-allow-a-featurecollectiontable-to-update-the-geometry-of-exist"&gt;GIS StackExchange&lt;/A&gt;&amp;nbsp;and got a response that this appears to be a bug in 100.2.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Jan 2018 16:09:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39554#M431</guid>
      <dc:creator>DanielCharles</dc:creator>
      <dc:date>2018-01-31T16:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a way to allow a FeatureCollectionTable to update the geometry of existing features?</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39555#M432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have logged this as a bug in ArcGIS Runtime SDK for .NET v100.2 and will try to address this issue in a release later this year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Feb 2018 16:20:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/is-there-a-way-to-allow-a-featurecollectiontable/m-p/39555#M432</guid>
      <dc:creator>MichaelBranscomb</dc:creator>
      <dc:date>2018-02-01T16:20:09Z</dc:date>
    </item>
  </channel>
</rss>

