open popup programmatically in js 3.x?

1421
2
Jump to solution
03-15-2018 09:31 AM
LefterisKoumis
Occasional Contributor III

I have a tool where a user clicks on a location, it performs a query for that location, and it returns the results by placing a graphic on the location and displays the results in an infowindow.

this.map.infoWindow.show(thePoint)

However, I use the popup panel widget developed by the guru Robert Scheitlin and the infowindow cannot work.

The issue is that I can't use infotemplate or popuptemplate because neither has the show property. The user will have to click on the location after the graphic is displayed,  to view the popup.

Another user described the same issue at:

javascript - How to trigger a Graphic's click event? - Stack Overflow 

and found the solution to use:

view.popup.open

However, this is only available in js 4.x

Any suggestions to accomplish the same task in js 3.x?

Thanks.

1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Lefteris,

   If your graphics has a infoTemplate or popuptemplate applied to it then you just use the

this.map.infoWindow.setFeatures([yourGraphic]);
this.map.infoWindow.show(thePoint)‍‍;

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

Lefteris,

   If your graphics has a infoTemplate or popuptemplate applied to it then you just use the

this.map.infoWindow.setFeatures([yourGraphic]);
this.map.infoWindow.show(thePoint)‍‍;
0 Kudos
LefterisKoumis
Occasional Contributor III

Thank you Robert. I misunderstood based on previous discussions that infowindow cannot work on the Popup panel and I didn't further look into infowindow. 

0 Kudos