Select to view content in your preferred language

Editor attribute inspector only show first attribute

893
2
09-30-2011 11:19 AM
deleted-user-Q-LwcOmvpdjW
Deactivated User
Hi,

I am sure I am missing something but I just cannot discover it...

I created a map in Flex and added two feature layers using ActionScript (note that I did not put any <esri:ArcGISDynamicMapServiceLayer>tag under <esri:Map id="map"> in mxml).

Then under the map tag, I assigned an editor
<esri:Editor id="editor" map="{map} toolbarVisible="true" />

In the map initialize function, I added two feature layers using the following code:
// Initialize layer1
layer1= new com.esri.ags.layers.FeatureLayer(url1);
layer1.id = "layer1";
map.addLayer(layer1);

// Initialize layer2
layer2= new com.esri.ags.layers.FeatureLayer(url2);
caLayer.id = "layer2";
map.addLayer(layer2);

Finally in the initialize function I assigned the editor with the two feature layers:
// Assign feature layers to the editor
editor.featureLayers = [layer1, layer2];

The effect is I can see the two feature layers in my Flex application, and I can also see the editor with correct layer information (shape and symbol). However, when I click on any of those features on the map, the attribute inspector is only showing the first attribute of the feature and there is no scroll bar.

Anyone knows why?

Thanks in advance!!!!
Tags (2)
0 Kudos
2 Replies
KeithGerhartz1
Frequent Contributor
Did you find an answer? I am experiencing the same issue.
0 Kudos
KeithGerhartz1
Frequent Contributor
This problem was resolved in my case by making sure to specify the outfields for the layer that was added to the map.

Example:

var featureLayer:FeatureLayer = new FeatureLayer;
featureLayer.outFields = ['*'];
0 Kudos