Based on the following sample:
Feature layer with popup | ArcGIS API for JavaScript
I created this:
FeatureLayer Select - JSFiddle
I don't understand how this is working -- I removed the map.on("click") event as it was always being called twice. It seems as if there is some default onClick event that is applied.
Thanks.
Solved! Go to Solution.
Glen,
having a popup for your map/feature layer is your first on click event. Once you add an on click event for your feature layer, that will be your 2nd.
I hope this is what you are asking
Tim
Glen,
having a popup for your map/feature layer is your first on click event. Once you add an on click event for your feature layer, that will be your 2nd.
I hope this is what you are asking
Tim
Thanks Tim. Is there any way to remove the popup click event?
I think the best question would be, what do you want to achieve?
Once the user zooms to a selected feature, I'll be adding new features to the map (another feature layer) within that selected area of interest. The user will then select features from new layer. I will add an event to handle the selection (e.g. on drawend). I don't want the popup click event still active.
Glen,
Sure there is a setInfoWindowOnClick method you can set to false.
Map | API Reference | ArcGIS API for JavaScript | setInfoWindowOnClick
Robert -- that did it, thanks!