AnsweredAssumed Answered

Popup content on multiple features

Question asked by cwilcomb on Mar 16, 2012
Latest reply on Mar 16, 2012 by cwilcomb
I have a popup that is called in an onclick event on the map. The click selects features from a feature layer within 20 pixels of the click, so the results can contain multiple features. I have the popup showing mutliple features but I cannot set the content of the popup to show the features' information. I have attached an image of the popup. I can set the content when using InfoWindow on the feature layer, but then I only get one feature (the one on top). Any suggestions?

Thanks,
Chad

Here is my code...

function init() {      lowerMHExtent_SP = new esri.geometry.Extent({ "xmin": 975650, "ymin": 194070, "xmax": 991760, "ymax": 203000, "spatialReference": { "wkid": 2263} });      //Define the Popup for InfoWindow     var popup = new esri.dijit.Popup(null, dojo.create("div"));     popup.setContent("<b>Permit Number</b>: ${PermitNumber}");       map = new esri.Map("map", {         extent: lowerMHExtent_SP,         width: 800,         infoWindow: popup,         height: 600,         logo: false     });       var basemap_gray = "http://myserver/ArcGIS/rest/services/basemap_gray/MapServer";     var basemap = new esri.layers.ArcGISTiledMapServiceLayer(basemap_gray);     map.addLayer(basemap);      dojo.connect(map, "onClick", function (evt) {         var query = new esri.tasks.Query();         //Query within 20 pixels of click point         query.geometry = pointToExtent(map, evt.mapPoint, 20);                  //flPermits is a feature layer that has had setDefinitionExpression applied to show only select features         var deferred = flPermits.selectFeatures(query, esri.layers.FeatureLayer.SELECTION_NEW);                      popup.setFeatures([deferred]);         popup.show(evt.mapPoint);      }); }


[ATTACH=CONFIG]12761[/ATTACH]

Attachments

Outcomes