0

I have successfully created a query for a feature layer. However, if I run the query while zoomed in, it only filters those graphics within view. When I zoom out, the areas that were not originally in view are not affected by the query.

Here is the site in question: Public Meeting Map

Here is the code

asked Sep 6, 2016 at 16:11
2
  • it would help if you could include the relevant code directly in your question, rather than making people open your app and hunt for it - you're more likely to get a good answer that way Commented Sep 7, 2016 at 1:57
  • 1
    Thanks for the comment. I definitely agree it wasn't the best way to present the question. I was posting this from mobile while stuck in a meeting. I edited the question to include a code pen link. Does that seem like the best way to do it? Rather than dumping all that script in here? Commented Sep 7, 2016 at 20:24

1 Answer 1

1

In your code here:

featureLayer = new FeatureLayer(featureLayerURL,{
 mode: FeatureLayer.MODE_ONDEMAND,
 infoTemplate: popupTemplate,
 outFields: ["*"],
 maxRecordCount: null
});

try setting mode: FeatureLayer.MODE_ONDEMAND to mode: FeatureLayer.MODE_SNAPSHOT. More about FeatureLayer modes.

answered Sep 7, 2016 at 0:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.