Select to view content in your preferred language

Domain Value in ArcGIS Javascript API

3996
2
08-20-2015 05:44 PM
terryHo1
Deactivated User

Dear Alll,

 

There is a problem that I faced in QueryTask with using infotemplate.

 


The infotemplate not allow to show Domain value from Geodatabase.

 

It only showed the code.

 

 

Are there any ways to display Domain value instead of the code value via query in ArcGIS Javascript API???

 

Thanks for your help!

 

I also attached the code of my query task for all your information and comments

 

var _treeInfoTemplate = new InfoTemplate ();

  _treeInfoTemplate.setTitle("<b>Tree Information</b>");

  var _treeInfoContent =

  "<div class=\"HKInfoContent\"></div>"

  _treeInfoTemplate.setContent(

  "<b>Tree ID:</b><br>${TREE_ID}<br><br>

  <b>Species:</b><br>${SPEC_TYPE}<br><br>

  <b>Record Date:</b><br>${RECORD_DT:DateFormat(selector: 'date', local: true, fullYear: true)}" +_treeInfoContent);

Tags (1)
0 Kudos
2 Replies
Lynchburg_GISDivision
Regular Contributor

Were you able to figure this out? I also have this question.

0 Kudos
by Anonymous User
Not applicable

Just found the answer in this thread: Feature layer hover attribute domain descriptions in info window

Instead of an InfoTemplate to set-up the fields for display you have to use the PopupTemplate