Embedded Dashboard Zoom to Feature

452
2
02-27-2023 02:34 PM
Labels (1)
Jefcoat_Nathan
New Contributor III

I'm having difficulty getting an embedded dashboard to zoom to a feature upon loading. The dashboard loads up, and I have "zoom" popping up in the URL info.  However, I can't get the dashboard to zoom to the desired feature. I've looked over the documentation, and it is unclear to me where I am designating the feature to be zoomed to upon loading.   

 

0 Kudos
2 Replies
MichaelGaiggEsri
New Contributor III

Hi Nathan, there are a couple of things you must do.

1) In your dashboard, settings: Create a url "feature" parameter, give it a name (e.g. eventid) and point it to the unique id in your layer (e.g. Event Id). Specify that the map should zoom to when this parameter is being passed in

MichaelGaiggEsri_0-1677863299868.png

 

2) In ExB: use the embed widget to embed your dashboard, connect it to the data that holds the event id and then specify the url to your dashboard separated by an # - use the little database icon at the bottom to include the field (don't just type it)

MichaelGaiggEsri_1-1677863461543.png

 

3) Also in ExB: Somehow set the selected framework item, e.g. through a list widget that lists all the items (in my case earthquakes, same layer that your embed widget is connected to). When user clicks on a list item, your embed widget will pass the correct url parameter to the dashboard.

PS: if your dashboard is on another page within ExB then you must specify a message action that notifies the framework that a data record has been selected. In that way the selected item is known to the "framework" and carried over to the other pages. Don't forget to specify the action data!!! 

MichaelGaiggEsri_2-1677863889653.png

 

 

0 Kudos
MattBewleyDCGov
New Contributor

@MichaelGaiggEsri Do you know if it's possible to do something like this but with multiple feature IDs? I'm trying to configure a filter action within an embedded dashboard based on the feature IDs in the output from an Experience Builder Query widget. The documentation suggests that a comma-separated list can be passed to a dashboard as a Feature URL parameter, but for the life of me I can't figure how to dynamically generate a comma-separated list of feature IDs...

0 Kudos