ipeebles

Feature Layers not loading at initial extent

Discussion created by ipeebles on Nov 5, 2013
Latest reply on Nov 5, 2013 by ipeebles
I have a number of dynamic map services and feature layers within my application.  The problem is, when I load the application the dynamic layers load, but the feature layers do not.  When I zoom in, then back out the feature layers will load.  I do not have any scale dependencies set.  Anyone have any ideas?

- All map services and feature layers are in the same projection


Here is some code that I am using to load the initial map extent and the feature layers.

// INITIAL EXTENT
var initialExtent = new esri.geometry.Extent({xmin: 2189149.355080,ymin: 221222.258573,xmax: 2095380.374129,ymax: 270817.384331,"spatialReference": {"wkid": 102724}
});
  
  
// MAP
map = new esri.Map("map", {
extent: initialExtent
});


// FFEATURE LAYERS USED FOR EDITING
var plantingsites = new esri.layers.FeatureLayer("http://<machine>/arcgis/rest/services/UrbanForestry/PublicTreeInventorySDE02/FeatureServer/1",{
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,  
  outFields: ['*'],
  //opacity:'0.0',   
  id: "plantingsites"
});  
  
var publictreeinventory = new esri.layers.FeatureLayer("http://<machine>/arcgis/rest/services/UrbanForestry/PublicTreeInventorySDE02/FeatureServer/0",{ 
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,  
  outFields: ['*'],
  //opacity:'0.0',
  id: "publictreeinventory"
}); 
        
map.addLayers([plantingsites, publictreeinventory]);

Outcomes