Feature layer hover attribute domain descriptions in info window

2454
4
07-05-2013 09:03 PM
TobiasFimpel
Occasional Contributor
I'm trying to adapt this ArcGIS API for Javascript example to suit my needs. The problem I am running into is that for fields with attribute domains the code and not the description is displayed in the info window.

Does anyone have any advice for possible solutions (or at least a good explanation)? I am very new to Javascript and would very very much appreciate any help. Here is a link to the test application I am working on. Here is a link to the relevant REST endpoint.

THANK YOU THANK YOU THANK YOU!
0 Kudos
4 Replies
ElenaBailey1
New Contributor
Hello. Have you found a solution to your problem above? I have the same issue and can't find a solution! Thank you!
0 Kudos
JakeSkinner
Esri Esteemed Contributor
Hi Elena,

If you use the PopupTemplate class for the infoTemplate, this will show the domain description. Ex:

var popupTemplate = new PopupTemplate({
          title: "{NAME}",
          description: "{District}" // field contains domain
        });      
    
var featLyr = new FeatureLayer(featureServiceURL, {
        mode: FeatureLayer.MODE_ONDEMAND,
        infoTemplate: popupTemplate,
        outFields: ["*"]
});
847396730
Occasional Contributor III
Hello!  Is it possible to expose the human readable values in a table, rather than a pop-up?
Thanks!
0 Kudos
KenBuja
MVP Esteemed Contributor
Marianne, you can always put the information in something like a dGrid. While these are not using Feature Layers, there are a few examples where the results of a QueryTask or IdentifyTask are put into a dGrid.

Missouri Legislative Analysis
- try the "Search for Information by District"
Washington State Spatial Prioritization Data Viewer - turn on several layers and click on the features
0 Kudos