Select to view content in your preferred language

FeatureLayer: Highlight Features with attachment

128
2
Jump to solution
12-04-2024 07:17 AM
MauroSantarossa
Emerging Contributor

Hi everyone,

I have a Map with a FeatureLayer loaded. Some features of this layer have an attachment associated.
 I'm wondering if there's a way to highlight these features on map so users can quickly see which features has an attachment.

Thanks for your help.

Mauro

0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

You could query for all attachments. The attachments query returns an object containing AttachmentInfos grouped by the source feature objectIds. Then use the objectsIds to highlight the features.

Here is a simple codepen app showing the concept. 

 

https://codepen.io/U_B_U/pen/qEWbPgj?editors=1000

View solution in original post

2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

You could query for all attachments. The attachments query returns an object containing AttachmentInfos grouped by the source feature objectIds. Then use the objectsIds to highlight the features.

Here is a simple codepen app showing the concept. 

 

https://codepen.io/U_B_U/pen/qEWbPgj?editors=1000

MauroSantarossa
Emerging Contributor

Uhhhh super 😀! Thank you so much!

0 Kudos