Select to view content in your preferred language

4.29 - HitTest not CORRECT

2287
5
02-01-2024 12:50 AM
michaelkdev
Regular Contributor

I have a FeatureLayer with 2 Graphics and rendering them with CIM symbols: '0'

michaelkdev_0-1706711232064.png

My HitTest function:

 

 view.on("click", (event) => {
        view.hitTest(event).then((result) => {
          ... 
        }
}

 

When clicking next to the graphic. hitTest is still returning these graphics sometimes. It looks like the click area is sometimes larger than it should.

michaelkdev_1-1706711540918.png

The green marker is the position of the mouse click event.

michaelkdev_2-1706711604970.png

When clicking at the red spot, no graphics in hitResults.

Sometimes it even triggers the wrong graphic.

 

Thanks 

 

0 Kudos
5 Replies
UndralBatsukh
Esri Regular Contributor

Hi Michael, 

It is not fixed.  I will update you when we have a fix.

Lerman
by
Frequent Contributor

Hello @UndralBatsukh ,

Nice to see you here. I noticed that the MapView.hitTest method in version 4.29 can retrieve features from the vectorTileLayer, which is a great feature. However, in my testing, I found that the SceneView.hitTest method does not currently support this functionality. I would like to inquire if there are any plans to make the SceneView.hitTest method also support retrieving features from the vectorTileLayer? Additionally, Do you happen to know the approximate release date for version 4.29? Thank you so much!

0 Kudos
UndralBatsukh
Esri Regular Contributor

Hi there, 

VectorTIleLayer hitTest will only be supported in 2D MapView at version 4.29. We will definitely add support it in 3D SceneView. Hopefully sooner than later.

0 Kudos
Lerman
by
Frequent Contributor

Hello @UndralBatsukh ,

You're very welcome! Looking forward to it! Thank you!

0 Kudos
UndralBatsukh
Esri Regular Contributor

Hi there, 

So we just fixed this issue and you will be able to test it out on our next version. Here is your app pointing to next version: https://codepen.io/U_B_U/pen/ExOWVgr?editors=1000

-Undral