I am developing JavaScript application. I have two feature layers one for features with point symbol and one for boundary with line symbol. I have added these two layers on map like below image.

enter image description here

I select one boundary and I want to see the point features which are inside the selected boundary and hide or remove the outside point features. I am able to query the features for selected boundary but unable to remove or hide the features that are outside the boundary.

Is there any solution to do this? (Like in graphicsLayer there is option for remove and add graphics)


One simple way of achieving that, is to handle an auxiliary layer. Then, each time you obtain a new set of features (result of the query), you clear the features of the auxiliary layer (the old set) and add the new set of features.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.