Solved! Go to Solution.
map.on("click", function(evt){
// Remove old Graphics
myGraphicsLayer.graphics.forEach(function(g){
if(g.visible === true)
myGraphicsLayer.remove(g);
});
var symbol, point, graphic;
var img = new Image();
img.src = '../../uihlein/test/images/star.png';
img.onload = function() {
symbol = new PictureMarkerSymbol('../../uihlein/test/images/star.png', this.width, this.height);
point = new Point(evt.mapPoint.getLongitude(), evt.mapPoint.getLatitude());
graphic = new Graphic(point, symbol);
myGraphicsLayer.add(graphic);
map.infoWindow.show(point);
}
});