Can't add two FeatureLayers with the same GeodatabaseFeatureTable to the MapView.Map

658
1
03-10-2021 05:48 AM
MattBryant
New Contributor II

I'm manually constructing offline layers from a .geodatabase file for a mobile app using QML.  I'm creating a FeatureLayer and assigning the FeatureTable property to a GeodatabaseFeatureTable and calling the Load function.  I have two layers that I'm trying to add.  Regardless of the order that I try and add the layers the second layer has a load error called "URI can't be empty" and the feature table claims to be in an Illegal State.  Can you not have two feature layers reference the same geodatabase table?  That seems to defeat the purpose of Layers.  Any help is greatly appreciated.

Thanks,

Matt

0 Kudos
1 Reply
JamesBallard1
Esri Regular Contributor

Hi @MattBryant . Thanks for reaching out to the team.

I'd like to understand your workflow a bit more. Can you explain what you're trying to achieve? 

We have a Qml sample that showcases this workflow.  https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_QMLSamples/Features...

You should not need to add multiple FeatureLayer layers from the same GeodatabaseFeatureTable - they will visualize the identical set of features and be indistinguishable from each other.

If you're trying to create multiple FeatureLayers from different GeodatabaseFeatureTables in the Geodatabase then that should work.

>Can you not have two feature layers reference the same geodatabase table?

No, that is not supported. I hope I have explained why it shouldn't be necessary, however. Please let me know if this information helps.

As a potential workaround you could create two different Geodatabase objects and then you could reference the same GeodatabaseFeatureTable in two feature layers; each once coming from the different Geodatabase.

0 Kudos