AnsweredAssumed Answered

At small scale, query does not find features within extent specified in javascript api

Question asked by Bobolast1 on Nov 26, 2018
Latest reply on Nov 28, 2018 by rscheitlin

I am using ArcgGIS Javascript 3.26. I am trying to write a code that determines the number of buildings within a land parcel.

 

The problem is that when the scale is low and I click on the land parcel, it doesn't find all building features in the land parcel (in theory it should be the same) and the geometry drawing of the building is bad.

However, at high scale it finds all the building features and the geometry of the building is drawn well as seen in the attachment. 

 

- The way the code works is that it allows the user to click on the land parcel feature layer

- Afterwards, a query is run using the geometry extent of the land parcel to find buildings in extent

- From the results, graphics are made and added to the map (for highlighting purposes)

 

I do not know why the scale of the map affects the query and also why the geometry of the features found is drawn so badly at a small scale. 

 

By the way the small scale attachment shows the scale at a large scale but when the land parcel was clicked (and triggered the query to fire), it was clicked at small scale, I just zoomed in afterwards.

Outcomes