Go to specific index in popup

194
3
Jump to solution
03-11-2024 11:21 AM
GeoffreyJoseph
New Contributor III

I have a popup with a variable number if features. Because the website is public facing and primarily aimed at users with no ArcGIS experience, we want to provide actions in case the users miss the "previous" and "next" arrows and the "select feature" option. We want to be able to provide the user with 3 primary actions that will always be returned in the query. I see the previous() and next() methods for popup, but how do I go directly to a specific index like the "select feature" option?

0 Kudos
2 Solutions

Accepted Solutions
GeoffreyJoseph
New Contributor III

What I ended up doing was just calculating an offset between selectedFeatureIndex and the known index and looping through it offset times using previous() or next(). Seems to work ok. I would still be interested in a more elegant solution.

View solution in original post

JoelBennett
MVP Regular Contributor

If you know the index, you can just set the selectedFeatureIndex value:

popup.selectedFeatureIndex = 5;

 

View solution in original post

0 Kudos
3 Replies
GeoffreyJoseph
New Contributor III

What I ended up doing was just calculating an offset between selectedFeatureIndex and the known index and looping through it offset times using previous() or next(). Seems to work ok. I would still be interested in a more elegant solution.

JoelBennett
MVP Regular Contributor

If you know the index, you can just set the selectedFeatureIndex value:

popup.selectedFeatureIndex = 5;

 

0 Kudos
GeoffreyJoseph
New Contributor III

Thanks 

0 Kudos