<?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 Feature has generalized geometry after loadAsync .net arcGisRuntime 100.9.0 in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/feature-has-generalized-geometry-after-loadasync/m-p/755#M5</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am experiencing an issue where features are not fully loading. Their geometry remains generalized.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code I am using (.net arcGISRuntime 100.9.0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uri serviceUri = new Uri(layerInfo.LayerUrl);&lt;BR /&gt;&lt;SPAN&gt;CenterlineFeatureLayer&amp;nbsp;&lt;/SPAN&gt;= new FeatureLayer(serviceUri);&lt;BR /&gt; await CenterlineFeatureLayer.LoadAsync();&lt;/P&gt;&lt;P&gt;Map.OperationalLayers.Add(CenterlineFeatureLayer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This happens before the map is visible (it's in another tab of the application).&amp;nbsp; When we view the map it looks like the attached snapshot, map-after-loadAsync.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oddly, if I don't load the layer by commenting out line 3, the geometry seems to be fully loaded. This is a bit hard to demonstrate, but in snapshot Map-no-load, you can see one non-generalized feature. There are other features visible because we apply normally apply definition expression. But the unloaded features don't have the needed columns so the code applies a blank definition expression and nothing is filtered out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A couple of more details: There should be tens of thousands of features in the service feature table. I seem to remember it only loading 1000 records at a time, so maybe its not loading the one I want to see? The features are all over north america, and we set the extent on the mapView after the feature is loaded -- the users selects a record on a different tab, then the map goes to corresponding feature in another tab (using MapView.SetViewpointGeometryAsync).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to force the features in the mapView's current viewport to load? Do I have to do anything after setting the definition expression? In the examples I've seen, the code just sets the definition expression.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 25 Oct 2020 17:18:03 GMT</pubDate>
    <dc:creator>KoryKarr</dc:creator>
    <dc:date>2020-10-25T17:18:03Z</dc:date>
    <item>
      <title>Feature has generalized geometry after loadAsync .net arcGisRuntime 100.9.0</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/feature-has-generalized-geometry-after-loadasync/m-p/755#M5</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am experiencing an issue where features are not fully loading. Their geometry remains generalized.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code I am using (.net arcGISRuntime 100.9.0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Uri serviceUri = new Uri(layerInfo.LayerUrl);&lt;BR /&gt;&lt;SPAN&gt;CenterlineFeatureLayer&amp;nbsp;&lt;/SPAN&gt;= new FeatureLayer(serviceUri);&lt;BR /&gt; await CenterlineFeatureLayer.LoadAsync();&lt;/P&gt;&lt;P&gt;Map.OperationalLayers.Add(CenterlineFeatureLayer);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This happens before the map is visible (it's in another tab of the application).&amp;nbsp; When we view the map it looks like the attached snapshot, map-after-loadAsync.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oddly, if I don't load the layer by commenting out line 3, the geometry seems to be fully loaded. This is a bit hard to demonstrate, but in snapshot Map-no-load, you can see one non-generalized feature. There are other features visible because we apply normally apply definition expression. But the unloaded features don't have the needed columns so the code applies a blank definition expression and nothing is filtered out.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A couple of more details: There should be tens of thousands of features in the service feature table. I seem to remember it only loading 1000 records at a time, so maybe its not loading the one I want to see? The features are all over north america, and we set the extent on the mapView after the feature is loaded -- the users selects a record on a different tab, then the map goes to corresponding feature in another tab (using MapView.SetViewpointGeometryAsync).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to force the features in the mapView's current viewport to load? Do I have to do anything after setting the definition expression? In the examples I've seen, the code just sets the definition expression.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Oct 2020 17:18:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/feature-has-generalized-geometry-after-loadasync/m-p/755#M5</guid>
      <dc:creator>KoryKarr</dc:creator>
      <dc:date>2020-10-25T17:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Feature has generalized geometry after loadAsync .net arcGisRuntime 100.9.0</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/feature-has-generalized-geometry-after-loadasync/m-p/756#M6</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After querying or identifying a feature are you explicitly loading that feature, or are you just loading the table? ie&lt;/P&gt;&lt;P&gt;await (feature as ILoadable).LoadAsync();&lt;BR /&gt;&lt;BR /&gt;Could you share some snippets showing how you retrieve a feature from the map?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2020 20:00:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/feature-has-generalized-geometry-after-loadasync/m-p/756#M6</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-10-26T20:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Feature has generalized geometry after loadAsync .net arcGisRuntime 100.9.0</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/feature-has-generalized-geometry-after-loadasync/m-p/757#M7</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The user selects a record on a grid. This record has a foreign key to a spatial table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We apply the definition expression like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;string whereClause = GetWhereClauseForLayer(layer); // Complicated logic based on columns the layer's table.&lt;BR /&gt; layer.DefinitionExpression = whereClause;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;After that, we center the mapview on the geometry for the corresponding feature(s) We query the table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;QueryParameters query = new QueryParameters&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; WhereClause = BuildWhereClause(columnName, ids) //similar, complicated logic&lt;BR /&gt; };&lt;BR /&gt; IEnumerable&amp;lt;Feature&amp;gt; features = await featureLayer.FeatureTable.QueryFeaturesAsync(query);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;//I just added this foreach block, but it doesn't seem to change anything.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;foreach (ILoadable feature in features.Cast&amp;lt;ILoadable&amp;gt;())&amp;nbsp; &lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; await feature.LoadAsync();&amp;nbsp;&lt;BR /&gt; }&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then we get the list of geometries and find the union and set the viewpoint:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;IList&amp;lt;Geometry&amp;gt; geometries = features.Where(f =&amp;gt; f.Geometry != null).Select(s =&amp;gt; s.Geometry).ToList();&lt;/P&gt;&lt;P&gt;Geometry unionedGeometry = GeometryEngine.Union(geometries);&lt;BR /&gt;await mapView.SetViewpointGeometryAsync(unionedGeometry, 10);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing that I just noticed now at home where the network is much slower. The map starts showing the feature's actual geometry, without a basemap (grey grid). Then the basemap slowly loads, and when it's done, the feature changes to the generalized shape.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2020 02:21:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/feature-has-generalized-geometry-after-loadasync/m-p/757#M7</guid>
      <dc:creator>KoryKarr</dc:creator>
      <dc:date>2020-10-27T02:21:06Z</dc:date>
    </item>
  </channel>
</rss>

