Hi Robert, The documentation for the Popup digit says that the required parameters are features. The features are an array of features or deferreds (i.e. Graphic[ ], Deferred[ ]). However, I am only able to pass a single graphic to this method in testing. For example, I have the following graphic array:
var graphicsLayerFeatures = [{"geometry":{"type":"point","x":-8767571.07357861,"y":4253201.3693682095,"spatialReference":{"wkid":102100}},"attributes":{"Type":"Water Meter Asset","Name":"Meter: 73186851","Id":"02i0x00000054jOAAQ"},"infoTemplate":{"title":"Water Meter Asset","content":"Type: ${Type} <br/>Name: ${Name} <br/><span class='link' onclick='LinkAsset(\"02i0x00000054jOAAQ\",\"Salesforce\")'>Link Asset</span>"},"symbol":{"style":"square","color":{"r":255,"g":0,"b":0,"a":0.5},"size":16,"outline":{"width":1.3333333333333333,"color":{"r":0,"g":0,"b":0,"a":1},"style":"solid"}}}]
If I pass this graphics array with one graphic in it (i.e. map.infoWindow.setFeatures(graphicsLayerFeatures)) map.infoWindow.setFeatures() fails with an error of:
Uncaught TypeError: a.getLayer is not a function
at Object.<anonymous> (init.js:1179)
at Object.forEach (init.js:70)
at Object._processFeatures (init.js:1179)
at Object.<anonymous> (init.js:63)
at Object.<anonymous> (init.js:644)
at Object.c [as onSetFeatures] (init.js:119)
at Object._updateFeatures (init.js:1178)
at Object.setFeatures (init.js:1171)
at Object.n (init.js:157)
at Object.setFeatures (init.js:1137)
However, if I pass only a graphic to map.infoWindow.setFeatures(i.e. map.infoWindow.setFeatures(graphicsLayerFeatures[0]) then map.infoWindow.setFeatures() succeeds.
How do I set more than on feature using map.infoWindow.setFeatures?
Thanks, Tyler