Select to view content in your preferred language

Multiple popups

305
1
06-06-2022 07:53 PM
Wade
by
Occasional Contributor

Currently only one popsup, Can possible to add multiple popups? 

 

 const query = featureLayerView.layer.createQuery();
                    query.returnGeometry = true;
                    query.outFields = ["*"];
                    query.geometry = buffer;

                    return featureLayerView
                        .queryFeatures(query)
                        .then(function (results) {
                            results.features.forEach((item, index) => {
                                mapView.popup.open({
                                    features: [item],
                                    location: item.geometry.centroid
                                });
                            }); 
                        })
                        .catch(function (error) {
                            console.log(error);
                        });

 

0 Kudos
1 Reply
ReneRubalcava
Honored Contributor

No, but you can use multiple Feature widgets to display data for multiple features.

https://developers.arcgis.com/javascript/latest/sample-code/widgets-feature/

0 Kudos