How do I make Featurelayer SelectFeaturesAsync work with a triangle ?

474
3
Jump to solution
05-16-2019 12:30 PM
KirkKuykendall2
Occasional Contributor

Hi -

Maybe this is a bug.  If not, How can I select with a triangle?

I modified the Feature layer Selection sample to call SelectFeaturesAsync with a triangle created from half the current mapextent.

It appears to be using the Extent of the triangle instead of the actual triangle. I would not expect it to select anything outside of the hatched triangle.


					
				
			
			
				
			
			
				
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
KimberlyMcCarty
Esri Contributor

I was able to reproduce this issue from GeoViewTapped Event Listener with specific points. The funny thing is if you run the same exact code where its not in an Event Listener/Button it will select the features just fine within the triangle.

Outside button/event listener:

Inside button/event listener:

I have also seen some sporadic behavior on this where if you click while zoomed in partly over this triangle it will again select correctly. You likely won't see that sporadic behavior when using the MapView's extent to create the triangle.

I will get started on logging a bug for this issue. If you let me know your customer number I can create a case and attach your organization to it so it will be trackable in My Esri.

View solution in original post

0 Kudos
3 Replies
KimberlyMcCarty
Esri Contributor

I was able to reproduce this issue from GeoViewTapped Event Listener with specific points. The funny thing is if you run the same exact code where its not in an Event Listener/Button it will select the features just fine within the triangle.

Outside button/event listener:

Inside button/event listener:

I have also seen some sporadic behavior on this where if you click while zoomed in partly over this triangle it will again select correctly. You likely won't see that sporadic behavior when using the MapView's extent to create the triangle.

I will get started on logging a bug for this issue. If you let me know your customer number I can create a case and attach your organization to it so it will be trackable in My Esri.

0 Kudos
KirkKuykendall2
Occasional Contributor

Hi Kimberly -

That's some strange behavior.  I'm able to consistently reproduce it by using the polygon I get from SketchEditor.  I am calling sketcheditor StartAsync from a command tied to a button though.

Anyway, thanks for reproducing this!

Kirk

Cust# 139276

Futura Systems Inc.

0 Kudos
KimberlyMcCarty
Esri Contributor

Hi Kirk,

I sent you an email but here are the details for the bug in case you missed it:

BUG-000122510: In the ArcGIS Runtime SDK, selecting features on a feature layer using featureLayer.SelectFeaturesAsync() uses the geometry of the polygon extent rather than the geometry of the polygon itself when querying from an event listener.

You should now be able to track it from the Support > Bugs tab from your organization's My Esri page.

Cheers,

Kim