Hi,
I know its possible to do with flex api.
Is it possible to do same with javascript api? I am trying to add info window for each graphic as below.
map.infoWindow.setTitle(title);
map.infoWindow.setContent(content);
map.infoWindow.show(graphic.geometry);
map.graphics.add(graphic);
it is adding for first graphic and if I try to add second graphic, the first graphic info window is deleting and it is adding to second graphic.
"The map is only allowed to have one info window (singleton design)." is this statement true for java script api?
All answers are greatly appreciated..
Thanks.
Naveen,
Yes there can only be one infoWindow in a map.
InfoWindow | API Reference | ArcGIS API for JavaScript
Note: Only one info window is displayed on the map at a time.
Robert,
Thanks for your quick reply. Is there any other way to show the graphic info on map for multiple graphics?
Thanks
Naveen,
Sorry I do not have any suggestions for this.
Why do you want to show multiple popups? That's probably very confusing for the user. Can't you show all the graphics in one popup with arrows to let the user page through the graphics? This is ootb functionality of the esri/dijit/Popup widget.
Heiko,
The application which is using flex API was in prod from couple of years and we don't want to change functionality while converting it to javascript API...I found one about popup...I will try below one..
https://community.esri.com/thread/101069
Thanks.
Hi Naveen,
I had the same requirement...couldn't find anything so built a Popup subclass to allow multiple popups on a map and a few other things.
Just put it up on Github...I know this thread's pretty old but may help others looking for it as I came across this one while searching for a solution.
Amazing work Nick! Have you managed to get it to work with feature services and layers from a webmap?
Based on your example, it seems to be working only for graphic layers at the moment.
Shay.
Hey mate. Haven't looked at this in ages so had to refresh my memory . The demo is using a couple of feature layers and a graphics layers. Just try it out with any type of layer, it should work the same as a regular popup. Not sure about layers from a webmap though.