Select to view content in your preferred language

show infoWindow after a QueryTask

993
1
Jump to solution
08-03-2016 06:05 AM
NatashaManzuiga
Regular 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
Regular 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
Regular 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);