trenthardy

VE.ArcGISLayerFactory CreateLayer not returning resourceInfo

Discussion created by trenthardy on Dec 10, 2010
The documentation for the ESRI.ArcGIS.VE.ArcGISLayerFactory class (http://help.arcgis.com/EN/webapi/javascript/bing/bingapi/html/M_ESRI_ArcGIS_VE_ArcGISLayerFactory_CreateLayer.htm) states that the callback function to the CreateLayer method returns a VETileSourceSpecification object and a json object with resource info about the service. When I make this call, though, I get the VETileSourceSpecification object, but no resource info (coming back undefined). Code snippet below. Any ideas?

<script type="text/javascript"
        src="http://serverapi.arcgisonline.com/jsapi/ve/?v=1.4" ></script>

<script type="text/javascript">
    var serviceObj = new ESRI.ArcGIS.VE.ArcGISLayerFactory();
    serviceObj.CreateLayer("http://server/ArcGIS/rest/services/service_name/MapServer", "LayerName", OnLayerCreated);

    function OnLayerCreated(tileSpec, resourceInfo) {
  alert(tileSpec); //object
  alert(resourceInfo); //undefined
 }
</script>

Outcomes