show infoWindow after a QueryTask

902
1
Jump to solution
08-03-2016 06:05 AM
NatashaManzuiga
Occasional Contributor


Hi All,

as a result of a queryTask I got one graphic (polygon), I don't want to add to the map.

I need to get the center and then simulate a click (polygon center) on the map to show infoWindow, is it possible?

Thank,

Naty

0 Kudos
1 Solution

Accepted Solutions
NatashaManzuiga
Occasional Contributor

I did it by myself!

var extent = graphicsUtils.graphicsExtent(featureSet.features)
var screenPoint = this.map.toScreen(extent.getCenter()); 
this.map.infoWindow.setFeatures([graphic]);
this.map.infoWindow.show(screenPoint);

View solution in original post

1 Reply
NatashaManzuiga
Occasional Contributor

I did it by myself!

var extent = graphicsUtils.graphicsExtent(featureSet.features)
var screenPoint = this.map.toScreen(extent.getCenter()); 
this.map.infoWindow.setFeatures([graphic]);
this.map.infoWindow.show(screenPoint);