Select to view content in your preferred language

Accessing geometry graphic in PopupContainer

867
5
03-14-2013 04:54 AM
JohanCarlsson
Regular Contributor
Hi!

I've gotten a request from users that they'd like to see which extent on the map they are viewing information about in the default popup container. As it is now, you might get several results when clicking on a coordinate, and you never know which area the information displayed is related to.

So, is there any way to access the geometry related to the information being displayed in the popup? I'd like to highlight each of them as the user scrolls through the hits.

Best regards,
Johan Carlsson
0 Kudos
5 Replies
JohanCarlsson
Regular Contributor
No ideas? I've tried using a query task but it doesn't really help since I can't guarantee that the geometry returned from the QueryTask matches the information displayed in the identify-dialog. Basically, I'd just like to access the information in the popup (all attributes displayed) and catch the event that fires when you step through the hits, enabling me to display a geometry in the map that relates to the information.

I'd be very grateful if anyone had a similar solution that would make this possible.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
No ideas? I've tried using a query task but it doesn't really help since I can't guarantee that the geometry returned from the QueryTask matches the information displayed in the identify-dialog.

I may miss something but your question seems tied to the popupcontainer. Which popup container are you using? How the popupcontainer binds to the list of graphics?
0 Kudos
JohanCarlsson
Regular Contributor
I may miss something but your question seems tied to the popupcontainer. Which popup container are you using? How the popupcontainer binds to the list of graphics?


Yes, it is tied to the popupcontainer. The xaml of the container being used is located in:
Layouts\Config\Layouts\ResourceDictionaries\Common\OnClickPopupContainerStyle.xaml

The behavior I'd like to achieve is the following:

  1. Click on the map

  2. The popupcontainer displays information about the object(s) clicked

  3. The geometry of the object viewed in the container is marked in the map also (possibly zooming to the full extent)


I tried to achieve this using the identify task, which gets me the same information as the popupcontainer does from a click. However, there is no way to ensure I am displaying the correct geometry for the information in the container and I can't change the geometry when the user uses the arrows (in the container) to display any other hits that might be available at the location of the click.

I'd still like to use the popupcontainer, only modify it's functionality slightly. Now there is no way of knowing if you're viewing information on a property, a municipality or an entire country, since it isn't visible in the map.

So what I'd like to know, is exactly what you said, how the container binds to the list of graphics returned from the click, how I can use this data, and how I can catch the event fired when the arrow in the container is clicked. I'd rather not muck about in the code of the original control if that is possible. That would be enough to solve this.

Thank you for your time, I hope I've explained well enough.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
Thank you for your time, I hope I've explained well enough.

Hi Johan,

It's clear:) but unfortunately I can't answer :confused:

The core SL API doesn't provide any popup container (it's why I told you about the popup container you were using).

It seems you are using a popup container provided by the Silverlight viewer, so you might get better answers by posting your question on the SL Viewer forum.
0 Kudos
JohanCarlsson
Regular Contributor
Hi Johan,

It's clear:) but unfortunately I can't answer :confused:

The core SL API doesn't provide any popup container (it's why I told you about the popup container you were using).

It seems you are using a popup container provided by the Silverlight viewer, so you might get better answers by posting your question on the SL Viewer forum.


Thank you, I'll try there instead. I'm having a hard time differentiating what concerns that API and what doesn't 😕
0 Kudos