Hi all,
I've been modifying code from ESRI's sample here:
Feature layer query multiple | ArcGIS API for JavaScript
In the live sample, it takes two clicks on a point to get a popup to appear. Is there a way for just one click to get the popup and related info at the same time? I was guessing that something needs to be changed in these lines:
dojo.connect(wellFeatureLayer, "onSelectionComplete", findRelatedRecords);
map.addLayer(wellFeatureLayer);
dojo.connect(map, "onClick", findWells);
I've tried a few things already: reordering these lines; passing all arguments in one dojo.connect. But, being non-programmer, I'm really not sure what's going on here. Can anybody help with getting one click to do both actions?
Thanks!
Solved! Go to Solution.
Found my own answer:
Change
mode: esri.layers.FeatureLayer.MODE_SELECTION,
to
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
Found my own answer:
Change
mode: esri.layers.FeatureLayer.MODE_SELECTION,
to
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,