Hello.
I am trying to add two feature layers from an offline runtime geodatabase and am not being able to access any legend information for these layers. I can access the legendInfos for dynamic map services layer.
Is this by design, or a bug?
In this case layer.legend returns an empty object (code below). Any help is appreciated.
Thank You
if(layer.layerType === Enums.LayerTypeFeature){ console.log(JSON.stringify(layer.renderer)); console.log(JSON.stringify(layer.legend)); }
This is a bug/known issue with 10.2.6. Our upcoming Quartz release of ArcGIS Runtime will support getting legend info from feature layers. In fact, beyond bringing in support for retrieving legend info on all layer types, we have greatly simplified the workflow for creating a legend control with our upcoming Quartz release.
Hi,
had the same problem trying to get infos about symbology. Only solution was to query the SQLite-Database (.geodatabase) using QtSql-API and grab the JSON describing the renderer. Most information is stored in the columns ItemInfo and AdvancedDrawingInfo of table GDB_ServiceItems.
Daniel
Genius...thank you for the tip Daniel, will try that.