Select to view content in your preferred language

Code from "Feature layer query multiple" sample--How to get popup and related info in side-panel to appear in one click?

3347
1
Jump to solution
01-14-2015 07:09 AM
ChrisRoberts1
New Contributor

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!

0 Kudos
1 Solution

Accepted Solutions
ChrisRoberts1
New Contributor

Found my own answer:

Change

mode: esri.layers.FeatureLayer.MODE_SELECTION,

to

mode: esri.layers.FeatureLayer.MODE_ONDEMAND,

View solution in original post

0 Kudos
1 Reply
ChrisRoberts1
New Contributor

Found my own answer:

Change

mode: esri.layers.FeatureLayer.MODE_SELECTION,

to

mode: esri.layers.FeatureLayer.MODE_ONDEMAND,

0 Kudos