AnsweredAssumed Answered

How to use SelectionManager

Question asked by mturnbullesriaustralia-com-au-esridist Employee on Jun 5, 2018
Latest reply on Feb 7, 2019 by khibmaesri-ca-esridist

I am building a custom WAB widget that selects features from a third party SOE across a number of predefined layers. I am trying to use the SelectionManager to present the highlighted features on the map and the associated selected records in the attribute table. Reference information about the SelectionManager is scant and I have been using the Select widget to see how I can implement it.

I have the code mostly working except that the highlighted features are not appearing on the map, they are however being selected in the attribute table.

I am using selectionManager.setSelection method passing in the appropriate layerObject, obtained from the appropriate layerInfo from the webmap and an array of Graphic objects for the selected features and these features definitely exist in the layer passed. The service containing the selection layer is a dynamic map service, not a feature service, but the Select tool works fine on this service.

I can't see any code in the Select widget to add the graphic objects to the map, so I assume the SelectionManager handles that, is this correct?

Does anyone have any ideas as to what I might be doing wrong?