Select to view content in your preferred language

Using URL Parameters to Zoom to a Feature by Attribute

228
4
Jump to solution
03-31-2025 07:01 AM
Labels (1)
WorcesterGTSS
Frequent Contributor

I want to have url parameters that will zoom to a particular parcel based on the property ID attribute in a field in my organization's parcels layer using my Experience Builder app. I have set up the Search widget per an earlier Esri Community post on this subject. However, I can't seem to get this to work. For example, I'll generate the URL after searching for a particular property - then I'll change the property ID value in the URL to a different one and the map will remain at the original location rather than zooming to the new property. This seems to be related to a string that appears after the data source ID - this changes each time I search for a different property ID (see red bolded text in the generated urls below. The green bold is the parcel property ID.

Can anyone explain what this string is and why it changes or have some advice on how I get a working url parameter that will accomplish what I'm looking for?

Thank you,

Samara

https://experience.arcgis.com/experience/a2380710835a4b8bb9fd9021adea8bd9?org=worcesterma#data_s=id%...3A26983&widget_3=search_status:%7B%22searchText%22%3A%2208-005-00018%22%7D&zoom_to_selection=true

https://experience.arcgis.com/experience/a2380710835a4b8bb9fd9021adea8bd9?org=worcesterma#data_s=id%...3A25358&widget_3=search_status:%7B%22searchText%22%3A%2203-008-00005%22%7D&zoom_to_selection=true

 

 

0 Kudos
1 Solution

Accepted Solutions
WorcesterGTSS
Frequent Contributor

For anyone coming across this, this ended up being my solution:

1. Do not include the Search widget in a widget controller.

2. Use this url parameter:

https://experience.arcgis.com/experience/<appID>#widget_3=search_status:%7B%22searchText%22%3A%22<parcelID>%22%7D  

(with the widget # being whatever your Search widget # is - you can look this up in ArcGIS Assistant)

View solution in original post

0 Kudos
4 Replies
Yuriko
by
Frequent Contributor

I think you may have to have an active selection in combination with the 'zoom_to_selection' parameter as per the documentation here

WorcesterGTSS
Frequent Contributor

For anyone coming across this, this ended up being my solution:

1. Do not include the Search widget in a widget controller.

2. Use this url parameter:

https://experience.arcgis.com/experience/<appID>#widget_3=search_status:%7B%22searchText%22%3A%22<parcelID>%22%7D  

(with the widget # being whatever your Search widget # is - you can look this up in ArcGIS Assistant)

0 Kudos
PaulCyr1
Occasional Contributor

I do not see how to identify the search widget_# in the ArcGIS Assistant nor do I see a widget_# in experience builder. Does ESRI have a widget that helps expose the actual URL Parameters because this guessing of widget numbers is not well done. It just should not be this difficult, it was certainly easier in web app builder.

0 Kudos
WorcesterGTSS
Frequent Contributor

I'm not going to argue that it should be easier to find the widget #s!

I found it by going into ArcGIS Assistant, clicking on the Experience Builder app in question, then clicking on View Item JSON from the Item Details pane that appears, and then clicking on the Data tab.

WorcesterGTSS_0-1745605424221.png

 

 

0 Kudos