Query widget with feature layer

732
2
04-07-2011 10:50 PM
ShannakaBeveridge
New Contributor II
I am customizing the query widget to run a query on an existing feature layer in the map. Basically I want to display all features from that layer in the list and have the infowindow configured to that layer come up when an individual feature is selected from the list.

The template I am using is the AttRelateInfoWinWidget by Robert Scheitlin. This works when I am not using the custom query widget but when the query widget is loaded the layer displays no information in the infowindow, even when the widget is closed.

I have commented out //map.addLayer(graphicsLayer) and replaced //queryLayer = new FeatureLayer(layerURL) with queryLayer = map.getLayer("MyLayer") as FeatureLayer. I have tried commenting out all references to the infowindow, but the infowindow still doesn't work when clicking on the point on the map even when the query widget is closed.

Any leads would be great as I'm out of ideas.

Cheers,

Shannaka
Tags (2)
0 Kudos
2 Replies
jonsosito
New Contributor
I am customizing the query widget to run a query on an existing feature layer in the map. Basically I want to display all features from that layer in the list and have the infowindow configured to that layer come up when an individual feature is selected from the list.

The template I am using is the AttRelateInfoWinWidget by Robert Scheitlin. This works when I am not using the custom query widget but when the query widget is loaded the layer displays no information in the infowindow, even when the widget is closed.

I have commented out //map.addLayer(graphicsLayer) and replaced //queryLayer = new FeatureLayer(layerURL) with queryLayer = map.getLayer("MyLayer") as FeatureLayer. I have tried commenting out all references to the infowindow, but the infowindow still doesn't work when clicking on the point on the map even when the query widget is closed.


hi shannaka, are you trying to make identify of a feature layer that will display in your infowindow?
0 Kudos
ShannakaBeveridge
New Contributor II
I think I've worked it out. Commented out //graphic.attributes = queryResult; in createQueryResults.
0 Kudos