This content has been marked as final. Show 6 replies
Can any one please reply for above question??
I am able to draw rectangle using above code but when i am highlighting the layers using same extent 1 or 2 records are highlighting out side of rectangle.
When you get the selected graphics back just use the extents.contains method to check each graphic.
Don't forget to click the Mark as answer check on this post and to click the top arrow (promote) as shown below:
I have question about polygons and lines for current view of map. When ever the polygon is visible fully on the map, I am getting features count using queryTask.executeForCount() method but when ever i am zooming into that polygon layer ,I am not getting any features using same method.It is working for points. Only thing I observed is points we can see fully on the map, but polygons and lines if we zoom we can not see whole layer on the map....
could you please help me on this??
If you are looking for polygons that are in the view extent but not fully then you have to use the extent.intersects method instead, as the extent.contains will only find those polygons that are FULLY in the extent (meaning thier whole geometry).
Thanks for your reply robert!!
How can I apply extent.intersects method while doing queryTask.executeForCount(query,new AsyncResponder(onCountResult, onFault,paramData));
I have query.geometry.extent but extent.intersects is Boolean So I am little bit confused to do this. I am already using Query.SPATIAL_REL_INTERSECTS for spatial relationship.
I actually misunderstood the issue you were speaking of in your earlier post. I do not Know why you are not getting the polygon if it is in your view either partially or wholly when you use queryTask.executeForCount and have the querys spatialRelationship set to SPATIAL_REL_INTERSECTS.