AnsweredAssumed Answered

Geopackage FeatureLayers and Cloning (Overview Map)

Question asked by artifact on Sep 17, 2019
Latest reply on Jul 2, 2020 by Shulligan

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.


GeoPackage geoPackage = await GeoPackage.OpenAsync(geoPackagePath);

FeatureTable geoPackageTable = geoPackage.GeoPackageFeatureTables.FirstOrDefault();

if (geoPackageTable == null) { return; }

FeatureLayer newLayer = new FeatureLayer(geoPackageTable);
await newLayer.LoadAsync();

FeatureLayer cloneLayer = (FeatureLayer)newLayer.Clone();



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.


Source layer on the top map, cloned layer on the bottom map.


To load the layer we would call LoadAsync(), but doing so on the cloned layer, creates the following error: 


Error returned on LoadAsync() of cloned layer


Is this a bug, or is there something I am missing about cloning Geopackage FeatureLayers?