this is my code. i clicked symbol and show infoTemplate . i want call function showResults(featureSet) show infoTemplate
function showResults(featureSet) {
//remove all graphics on the maps graphics layer
myMap.graphics.clear();
var resultFeatures = featureSet.features;
//Loop through each feature returned
for (var i = 0, il = resultFeatures.length; i < il; i++) {
//Get the current feature from the featureSet.
//Feature is a graphic
var attr = resultFeatures.attributes;
var title = attr.TEN;
var content = "Field ID : " + attr.OBJECTID
+ "<br />Tên: " + attr.TEN
+ "<br />Địa chỉ : " + attr.TEN
//initialize InfoTemplate
infoTemplate = new InfoTemplate("Kết quả tìm kiếm:", content);
// myMap.infoWindow.setTitle(title);
// myMap.infoWindow.setContent(content);
// myMap.infoWindow.show(resultFeatures[0].geometry);
var graphic = resultFeatures;
graphic.setSymbol(symbol1);
//Set the infoTemplate.
graphic.setInfoTemplate(infoTemplate);
// //Add graphic to the map graphics layer.
// myMap.graphics.add(graphic);
myMap.graphics.add(graphic);
//
myMap.centerAndZoom(resultFeatures[0].geometry, 7);
}
}