So I have a program where I create the following variables:
var point = new Point();
var markerSymbol = new PictureMarkerSymbol();
var graphic = new Graphic(point, markerSymbol);
I am able to display this new graphic on my map no problem anywhere I want but is it possible to make a click event on my graphic that will display an information window. I was thinking that it would be possible using dojo/on but I could not figure out how to use dojo/on to attach a click event to the graphic.
Thanks...
Hi Brian,
You don't need to trigger the click event to open the infowindow.
You may want to try this code snippet.
First you need to have a graphiclayer and add graphiclayer into the map.
Also Create the infotemplate.
and Add your newly created graphic into that graphic layer.
this.map.centerAt(point);
this.map.infoWindow.setFeatures([graphic]);
this.map.infoWindow.show(point);
The concept is derived from that help