Problem with FeatureLayer

Discussion created by feng0hua0 on Jan 3, 2012
Latest reply on Jan 5, 2012 by feng0hua0
    I was tried to load all my layers with esri.layers.FeatureLayer, but some features are not loaded. When I switch to esri.layers.ArcGISTiledMapServiceLayer, all layers loaded correct.
    Here are some screenshots:

This one use ArcGISTiledMapServiceLayer with code:
map.addLayer(new esri.layers.ArcGISTiledMapServiceLayer("http://localhost/ArcGIS/rest/services/Test/MapServer"));

This one use FeatureLayer with code:
layers = new Array();

layers[0] = new esri.layers.FeatureLayer("http://localhost/ArcGIS/rest/services/Test/MapServer/0", {
   mode : esri.layers.FeatureLayer.MODE_ONDEMAND,
   outFields : ["*"]

layers[1] = new esri.layers.FeatureLayer("http://localhost/ArcGIS/rest/services/Test/MapServer/1", {
   mode : esri.layers.FeatureLayer.MODE_ONDEMAND,
   outFields : ["*"]


I don't know where is the problem, any suggestion will be appreciate! Thanks!