Problem with FeatureLayer

584
1
01-03-2012 11:38 AM
YanyiZhang
New Contributor
Hello,
    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 : ["*"]
  });

map.addLayers(layers);


I don't know where is the problem, any suggestion will be appreciate! Thanks!
0 Kudos
1 Reply
YanyiZhang
New Contributor
OK. I found the problem and solution. In ArcGIS Server service setting, there is a property named "Maximum Number of Records Returned by Server", by default it's 500. Just set it to a large enough number, and problem solved.
0 Kudos