<?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 Add multiple layers to map pointing to same table  in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/add-multiple-layers-to-map-pointing-to-same-table/m-p/506073#M6234</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In our offline maps the users require that they be able to view a specific linear&amp;nbsp;features in multiple ways.&amp;nbsp; This is a pretty standard need within our industry.&amp;nbsp; These layers also happen to be quite large ~600 Mb.&amp;nbsp; The hope was that we could have a single replica of this data and render it multiple ways in the offline map.&amp;nbsp; Identical to how you would do in ArcMap or ArcGIS Pro by adding a layer from the same table symbolized differently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to write a tool and uses different services to generate the renderers serialized into json, which I thought was going to be the hurdle to overcome.&amp;nbsp; Using these files it is possible to create a feature layer and use the json to create the renderer as hoped.&amp;nbsp; Unfortunately, from what I see this approach is not possible.&amp;nbsp; It would seem that for some reason a GeodatabaseFeatureTable can only be used as the source for a single FeatureLayer.&amp;nbsp; When the application tries to create the second FeatureLayer the following error occurs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Esri.ArcGISRuntime.ArcGISRuntimeException: Object already owned.: Already owned.&lt;BR /&gt; at Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)&lt;BR /&gt; at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)&lt;BR /&gt; at RuntimeCoreNet.GeneratedWrappers.CoreFeatureLayer..ctor(CoreFeatureTable featureTable)&lt;BR /&gt; at Esri.ArcGISRuntime.Mapping.FeatureLayer..ctor(FeatureTable featureTable)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Why?&amp;nbsp; What is the reasoning behind only allowing a &lt;SPAN&gt;GeodatabaseFeatureTable&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;to be 'owned' by a single FeatureLayer?&amp;nbsp; Is there something else I am possibly doing that would cause this error or is this idea something that is not possible?&amp;nbsp; The ability to apply different renders and/or definition expressions to the same&amp;nbsp;&lt;SPAN&gt;GeodatabaseFeatureTable would allow us to greatly reduce the footprint of offline replicas and reduce the amount of data syncronization required so it would be a great solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Joe&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Jan 2018 00:19:05 GMT</pubDate>
    <dc:creator>JoeHershman</dc:creator>
    <dc:date>2018-01-10T00:19:05Z</dc:date>
    <item>
      <title>Add multiple layers to map pointing to same table</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/add-multiple-layers-to-map-pointing-to-same-table/m-p/506073#M6234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In our offline maps the users require that they be able to view a specific linear&amp;nbsp;features in multiple ways.&amp;nbsp; This is a pretty standard need within our industry.&amp;nbsp; These layers also happen to be quite large ~600 Mb.&amp;nbsp; The hope was that we could have a single replica of this data and render it multiple ways in the offline map.&amp;nbsp; Identical to how you would do in ArcMap or ArcGIS Pro by adding a layer from the same table symbolized differently.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to write a tool and uses different services to generate the renderers serialized into json, which I thought was going to be the hurdle to overcome.&amp;nbsp; Using these files it is possible to create a feature layer and use the json to create the renderer as hoped.&amp;nbsp; Unfortunately, from what I see this approach is not possible.&amp;nbsp; It would seem that for some reason a GeodatabaseFeatureTable can only be used as the source for a single FeatureLayer.&amp;nbsp; When the application tries to create the second FeatureLayer the following error occurs:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Esri.ArcGISRuntime.ArcGISRuntimeException: Object already owned.: Already owned.&lt;BR /&gt; at Esri.ArcGISRuntime.ArcGISException.HandleCoreError(CoreError error, Boolean throwException)&lt;BR /&gt; at RuntimeCoreNet.GeneratedWrappers.Interop.CheckError(IntPtr errorHandle, Boolean throwOnFailure, GCHandle wrapperHandle)&lt;BR /&gt; at RuntimeCoreNet.GeneratedWrappers.CoreFeatureLayer..ctor(CoreFeatureTable featureTable)&lt;BR /&gt; at Esri.ArcGISRuntime.Mapping.FeatureLayer..ctor(FeatureTable featureTable)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Why?&amp;nbsp; What is the reasoning behind only allowing a &lt;SPAN&gt;GeodatabaseFeatureTable&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;to be 'owned' by a single FeatureLayer?&amp;nbsp; Is there something else I am possibly doing that would cause this error or is this idea something that is not possible?&amp;nbsp; The ability to apply different renders and/or definition expressions to the same&amp;nbsp;&lt;SPAN&gt;GeodatabaseFeatureTable would allow us to greatly reduce the footprint of offline replicas and reduce the amount of data syncronization required so it would be a great solution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Joe&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jan 2018 00:19:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/add-multiple-layers-to-map-pointing-to-same-table/m-p/506073#M6234</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2018-01-10T00:19:05Z</dc:date>
    </item>
  </channel>
</rss>

