add featureset in graphics layer without iterating

المشرف العام

Administrator
طاقم الإدارة
I have a geoprocessing service that returns a large amount of features (featureSet).I want to attach them in a graphics layer, but I dont wont to iterate over all them. I tried using the mygraphicLayer.graphics opotion so as to set the features (array of graphics) to the graphic layer but it does not work.Have you got any idea how i could do this?

function addCityFeatureSetToMap(featureSet) { console.debug("featureSet ", featureSet) var symbol = new esri.symbol.SimpleMarkerSymbol(); symbol.setColor(new dojo.Color([0,0,255])); //Create graphics layer for cities var cityLayer = new esri.layers.GraphicsLayer({ graphics: featureSet.features }); map.addLayer(cityLayer);

أكثر...
 
أعلى