AnsweredAssumed Answered

Attribute Inspector works only once on featurelayer. why?

Question asked by alifJordan on Aug 20, 2019
Latest reply on Aug 20, 2019 by alifJordan

Hi,

 

I am working on two feature layers viz. A polygon layer and a point layer. I have configured attribute inspector in order to edit the attributes of the features of both the layers.

 

When I click on say pointLayer I am doing this and infowindow shows for once. After that, if I click again on any of the two layer's features,I get the image attached after the code. What am I doing wrong?

 

 BuildingFlayer.on("click", function featureLayerLoaded(svt)
        {
                atInspcForBldg.refresh();
                var selectQuery = new Query();
                selectQuery.distance = 10;
                selectQuery.units = "meters"
                selectQuery.geometry = svt.mapPoint;
                selectQuery.returnGeometry = true;
                BuildingFlayer.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function (features) {
                if (features.length > 0) {
                    //store the current feature
                    updateFeaturebldg = features[0];
                    map.infoWindow.setContent(atInspcForBldg.domNode);
                    map.infoWindow.resize(350, 240);
                    map.infoWindow.setTitle(features[0].getLayer().name);
                    map.infoWindow.show(svt.screenPoint, map.getInfoWindowAnchor(svt.screenPoint));
                }
                else {
                    map.infoWindow.hide();
                }
            });
        });

 

 

Regards,

Alif

Outcomes