Thanks for your help, but unfortunately, this approach is not working in 4.0 with a PopupTemplate.
// CODE
var wrpProjectsPopupTemplate = new PopupTemplate({
title: "{MapLayer}",
content: setPopupTemplateContent()
});
function setPopupTemplateContent(graphic) {
try {
var attr = graphic.attributes; -- getting error the graphic is undefined
return attr;
}
catch (err)
{
return err.message;
}
}
I may see if I can either get the graphic on a map click of the view or find an alternative the the PopupTemplate.
Thanks