Select to view content in your preferred language

Question about legend for a feature layer from an offline geodatabase.

5088
3
04-06-2016 12:09 PM
ISSRWEB
New Contributor II

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));          
  }
Tags (1)
0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor

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.

0 Kudos
DanielBachmann1
New Contributor

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

0 Kudos
ISSRWEB
New Contributor II

Genius...thank you for the tip Daniel, will try that.

0 Kudos