queryTask.execute(query);
queryTask.on("complete", lang.hitch(this, function(evt) {
var featureSet = evt.featureSet;
console.log('featureSet', featureSet);
var resultFeatures = featureSet.features;
console.log('SearchResults: ', resultFeatures);
console.log('geometryType: ', featureSet.geometryType);
var newSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_DASHDOT,
new Color([255, 0, 0, 1]), 2), new Color([255, 255, 0, 0.05]));
this._graphicsLayer.add(new Graphic(geometry, newSymbol));
var highlightSymbol;
switch(featureSet.geometryType) {
case 'esriGeometryPoint':
highlightSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 20, null, '#00FFFF');
break;
case 'esriGeometryPolyline':
highlightSymbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, '#00FFFF', 3);
break;
case 'esriGeometryPolygon':
highlightSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_SOLID,
new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, '#00FFFF', 2),
'#e74c3c');
break;
}
for (var i = 0; i < resultFeatures.length; i++) {
var graphic = resultFeatures[i].geometry;
this._graphicsLayer.add(new Graphic(graphic, highlightSymbol));
}
if (FeatureClassName.length > 0) {
if (resultFeatures.length > 0) {
resultFeaturesALL.push({
"ClassName": FeatureClassName[j].ClassName,
"Feautes": resultFeatures
});
}
j = j + 1;
}
console.log('Array: ', resultFeaturesALL);
}));
}