Select to view content in your preferred language

Arcgis connect button to webMap javascript

844
4
Jump to solution
08-21-2023 04:47 AM
tomaskudrna
New Contributor II

Hello, I need help please, I use vue3 and I need when I have a div button to click e.g. one element, so that the map shows exactly the element as if I clicked on it in the map.
Please help.
I am adding examples in the images.
Code: codepen
Image:
tomaskudrna_0-1692618165118.png

As you can see in the picture I need, when I click on the element on the left of the button, I need the info table about it to open like this and be highlighted. PLEASE

0 Kudos
1 Solution

Accepted Solutions
LaurenBoyd
Esri Contributor

Hi @tomaskudrna 

The behavior you're trying to implement seems similar to the user interaction of this sample: https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-query-pagination/ 

The main thing you would need to do is when the element is clicked, you could query for the feature related to that element, then call MapView.openPopup with the related feature passed in to the features option of the method to open its popup.

Lauren

View solution in original post

0 Kudos
4 Replies
LaurenBoyd
Esri Contributor

Hi @tomaskudrna 

The behavior you're trying to implement seems similar to the user interaction of this sample: https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-query-pagination/ 

The main thing you would need to do is when the element is clicked, you could query for the feature related to that element, then call MapView.openPopup with the related feature passed in to the features option of the method to open its popup.

Lauren
0 Kudos
tomaskudrna
New Contributor II

Hi @LaurenBoyd , thank you, but the sample is wrong, can you send it again please?
I will try other options, thank you 🙂
Sample:

tomaskudrna_0-1692706141537.png

 

0 Kudos
LaurenBoyd
Esri Contributor

Apologies for that! I sent the incorrect link. Here's the link: https://developers.arcgis.com/javascript/latest/sample-code/featurelayer-query-pagination/ 

Lauren
0 Kudos
tomaskudrna
New Contributor II

Thank you very much, you helped me a lot, I've already solved it 🙂

0 Kudos