Hi there,
var stadium = [];
var symbol = new esri.symbol.PictureMarkerSymbol('/images/icons/stadium.png', 25, 25);
var infoTemplate = new esri.InfoTemplate();
infoTemplate.setTitle("Stadium");
infoTemplate.setContent("This is a stadium.");
var graphic = PointGraphic;
graphic.setSymbol(symbol);
graphic.setInfoTemplate(infoTemplate);
stadium.push(OneMap.map.graphics.add(graphic));
dojo.connect(themeGraphicsLayer, "onClick", function (evt) {
mashup.GetDataForCallout(evt.graphic, "", function (results) {
var formattedResults = formatResults(results);
map.infoWindow.setContent(formattedResults);
map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
});
})
}
function formatResults(resultObject) {
var nameVal = ""
for (var i = 0; i < resultObject.length; i++) {
nameVal = nameVal + "<br>"
nameVal += "<strong>" + resultObject["NAME"] + "</strong>" + "<br/>"
nameVal += resultObject["DESCRIPTION"] + "<br/>"
nameVal += "<a href=" + resultObject["HYPERLINK"] + " target='_blank'>More Info</a>" + "<br/>"
if (resultObject["PHOTOURL"] != "") {
nameVal += "<img src=" + resultObject["PHOTOURL"] + "></img>" + "<br/>"
}
else {
nameVal += "<br/>"
}
nameVal += resultObject["ADDRESSBLOCKHOUSENUMBER"] + " " + resultObject["ADDRESSSTREETNAME"] + " " + resultObject["ADDRESSBUILDINGNAME"] + " " + resultObject["ADDRESSFLOORNUMBER"] + " " + resultObject["ADDRESSUNITNUMBER"] + "<br/>"
nameVal += "Singapore " + resultObject["ADDRESSPOSTALCODE"] + "<br/>"
}
return nameVal
}
Thanks and regards.