<?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 Geopackage FeatureLayers and Cloning (Overview Map) in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/geopackage-featurelayers-and-cloning-overview-map/m-p/652710#M8168</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm attempting to create an overview map of my main map, which is populated with FeatureLayers from a Geopackage. According to the documentation to use a single FeatureLayer on multiple maps the layer should be cloned, and the clone used on the secondary Map. When using Geopackage layers this doesn't appear to work. The cloned layer is returned in a "NotLoaded" LoadStatus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;GeoPackage geoPackage = await GeoPackage.OpenAsync(geoPackagePath);&lt;/P&gt;&lt;P&gt;FeatureTable geoPackageTable = geoPackage.GeoPackageFeatureTables.FirstOrDefault();&lt;/P&gt;&lt;P&gt;if (geoPackageTable == null) { return; }&lt;/P&gt;&lt;P&gt;FeatureLayer newLayer = new FeatureLayer(geoPackageTable);&lt;BR /&gt; await newLayer.LoadAsync();&lt;/P&gt;&lt;P&gt;FeatureLayer cloneLayer = (FeatureLayer)newLayer.Clone();&lt;/P&gt;&lt;P&gt;SourceMap.OperationalLayers.Add(newLayer);&lt;BR /&gt; CloneMap.OperationalLayers.Add(cloneLayer);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus null values are returned for many of the FeatureLayer properties, such as the Renderer or FullExtent. This also means that the Layer itself is not visible on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Source layer on the top map, cloned layer on the bottom map." class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/459807_cloned.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To load the layer we would call&amp;nbsp;LoadAsync(), but doing so on the cloned layer, creates the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Error returned on LoadAsync() of cloned layer" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/459808_error.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a bug, or is there something I am missing about cloning Geopackage FeatureLayers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Sep 2019 22:43:39 GMT</pubDate>
    <dc:creator>artifact</dc:creator>
    <dc:date>2019-09-17T22:43:39Z</dc:date>
    <item>
      <title>Geopackage FeatureLayers and Cloning (Overview Map)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/geopackage-featurelayers-and-cloning-overview-map/m-p/652710#M8168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm attempting to create an overview map of my main map, which is populated with FeatureLayers from a Geopackage. According to the documentation to use a single FeatureLayer on multiple maps the layer should be cloned, and the clone used on the secondary Map. When using Geopackage layers this doesn't appear to work. The cloned layer is returned in a "NotLoaded" LoadStatus.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;GeoPackage geoPackage = await GeoPackage.OpenAsync(geoPackagePath);&lt;/P&gt;&lt;P&gt;FeatureTable geoPackageTable = geoPackage.GeoPackageFeatureTables.FirstOrDefault();&lt;/P&gt;&lt;P&gt;if (geoPackageTable == null) { return; }&lt;/P&gt;&lt;P&gt;FeatureLayer newLayer = new FeatureLayer(geoPackageTable);&lt;BR /&gt; await newLayer.LoadAsync();&lt;/P&gt;&lt;P&gt;FeatureLayer cloneLayer = (FeatureLayer)newLayer.Clone();&lt;/P&gt;&lt;P&gt;SourceMap.OperationalLayers.Add(newLayer);&lt;BR /&gt; CloneMap.OperationalLayers.Add(cloneLayer);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus null values are returned for many of the FeatureLayer properties, such as the Renderer or FullExtent. This also means that the Layer itself is not visible on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Source layer on the top map, cloned layer on the bottom map." class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/459807_cloned.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To load the layer we would call&amp;nbsp;LoadAsync(), but doing so on the cloned layer, creates the following error:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Error returned on LoadAsync() of cloned layer" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/459808_error.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a bug, or is there something I am missing about cloning Geopackage FeatureLayers?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2019 22:43:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/geopackage-featurelayers-and-cloning-overview-map/m-p/652710#M8168</guid>
      <dc:creator>artifact</dc:creator>
      <dc:date>2019-09-17T22:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Geopackage FeatureLayers and Cloning (Overview Map)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/geopackage-featurelayers-and-cloning-overview-map/m-p/652711#M8169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The on-disk feature tables acts slightly different and I don't believe a clone would really work, as the underlying datasource/featuretable would still be the same.&lt;/P&gt;&lt;P&gt;Instead I think you'd need to open a second instance of the geopackage instead - that should give you a better clone of the feature table.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2019 23:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/geopackage-featurelayers-and-cloning-overview-map/m-p/652711#M8169</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2019-09-17T23:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Geopackage FeatureLayers and Cloning (Overview Map)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/geopackage-featurelayers-and-cloning-overview-map/m-p/652712#M8170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Morten!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2019 23:55:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/geopackage-featurelayers-and-cloning-overview-map/m-p/652712#M8170</guid>
      <dc:creator>artifact</dc:creator>
      <dc:date>2019-09-17T23:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Geopackage FeatureLayers and Cloning (Overview Map)</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/geopackage-featurelayers-and-cloning-overview-map/m-p/652713#M8171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How did you resolve this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having the same problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Jul 2020 10:22:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/geopackage-featurelayers-and-cloning-overview-map/m-p/652713#M8171</guid>
      <dc:creator>ShaneHulligan</dc:creator>
      <dc:date>2020-07-02T10:22:17Z</dc:date>
    </item>
  </channel>
</rss>

