Highlight Features by Geometry 4.x

616
2
Jump to solution
05-10-2022 06:33 PM
AECOM_Sydney
New Contributor

Hi,

I'm looking to apply the principals from this example below, but to a polygon feature class. Unfortunately, it keeps getting the following error.

error happened: Cannot read properties of undefined (reading 'length')

https://developers.arcgis.com/javascript/latest/sample-code/highlight-features-by-geometry/

Thank you in advance,

Steve

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

The sample should work with a feature service with any geometry types. Can you tell me which line or method s throwing this error? Simple reproducible case can help to narrow down the issue. 

 

Here is the same sample working with polygon feature service: https://codepen.io/U_B_U/pen/QWQERdX?editors=1000

 

View solution in original post

2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

The sample should work with a feature service with any geometry types. Can you tell me which line or method s throwing this error? Simple reproducible case can help to narrow down the issue. 

 

Here is the same sample working with polygon feature service: https://codepen.io/U_B_U/pen/QWQERdX?editors=1000

 

AECOM_Sydney
New Contributor

Thank you for this, I wasn't suing the correct field type when doing the selection.

0 Kudos