Select to view content in your preferred language

Why doesn't pop-up list all attributes for selected feature?

660
1
03-12-2013 08:42 AM
IB1
by
Regular Contributor
My question is pertaining to the following template:
https://github.com/DavidSpriggs/ConfigurableViewerJSAPI

Created by David Briggs of ESRI

I edited the Config.js file to include my services.

For example:

operationalLayers: [{
  type: "feature",
  url: "http://xxxxxx.com/arcgis/rest/services/xxxxx/xxxxxxx/0",
  options: {
   id: "Cable",
   title: "Cable",
   opacity: 1.0,
   visible: true,
   infoTemplate: new esri.InfoTemplate("Attributes", "${*}"),
   mode: esri.layers.FeatureLayer.MODE_SNAPSHOT
   }}]


Now from what I've looked up and understand, the line:
infoTemplate: new esri.InfoTemplate("Attributes", "${*}"),


Should show all attributes for the feature when it's clicked.

But it's only showing 1 or 2 of the attributes when there are many more.

Am I not correctly understanding what "${*}" is doing?

I would like to list ALL the attributes.
0 Kudos
1 Reply
StephenLead
Honored Contributor
You may also need to specify the fields to be included in the feature layer definition. see http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/featurelayer.html#FeatureLayer/FeatureLayer... which implies that only the OBJECTID field will be returned if you don't include a list of fields.

Try adding:

options: {
  id: "Cable",
  title: "Cable",
  opacity: 1.0,
  visible: true,
  outFields: ["*"],
  infoTemplate: new esri.InfoTemplate("Attributes", "${*}"),
  mode: esri.layers.FeatureLayer.MODE_SNAPSHOT
}
0 Kudos