Select to view content in your preferred language

Use URL Parameter to Zoom to Feature?

5597
23
Jump to solution
03-09-2022 11:32 AM
Labels (1)
JessicaWeinberg
New Contributor III

The Interactive Legend Instant App allows the use of URL parameters, but I can only figure out how to use them to highlight a feature/open its pop-up. How can I get it to also zoom in to that feature specified in the URL?

Basically, I'm looking for functionality equivalent to what's available in the Basic Viewer Configurable App, since it seems like Configurable Apps are being retired. If it isn't to be found in Instant Apps, is there another App I should try?

Tags (1)
23 Replies
RandyMcGregor3
Occasional Contributor III

Is there documentation that explains what parameters Instant apps will accept? I've only had luck with web app builder url parameters. If Instant Apps accept url parameters, the formatting seems different, because I have not had any luck.

Thank you,

Randy McGregor

RyanBohan
Regular Contributor

Does instant apps not support URL Parameters in the same way as webapps?

In the class webapps, you could use a URL with &Find-....

https://webmaps.sandiego.gov/portal/apps/webappviewer/index.html?id=e05946e66cf24272af5dd779195317ff...  

When the map loaded, it would zoom to the location and open the pop-up.

RyanBohan_0-1683925446237.png

Trying to repeat the functionality in SideBar Instant app

https://sandiego.maps.arcgis.com/apps/instant/sidebar/index.html?appid=75f6a5d68aee481f8ff48240bcaa1...

The map does not zoom, the pop-up does not appear, only places a circle for the location.

RyanBohan_0-1683926633710.png

If I use the search function directly

 RyanBohan_1-1683926633713.png

The map behaves like webapp classic, zooming into the location and loading the pop-up.

Zooming in manually and clicking is not ideal, as this map is showing parcels, which can be stacked.  

RyanBohan_2-1683926633732.png

How do I do this with a URL Parameters in Instant Apps in the same way we could in webapp classic?

KellyHutchins
Esri Frequent Contributor

With the find url param it's getting the first search result (in this case from the World Geocoder) and displaying that instead of using a more accurate match from one of the other locators. We'll look into improving that behavior in a future release. 

But in Sidebar you might be able to get what you want by setting up a custom url parameter. In the app configuration if you search for URL you'll see an option to setup a custom url param by specifying a parameter name and then choosing the layer and field the value comes from. In this example I set up a parameter called apn and use the APN field from the San Diego Parcels layer: https://jsapi.maps.arcgis.com/apps/instant/sidebar/index.html?appid=903d7cc412a8488f90c79d9bd49a3f2f...

RyanBohan
Regular Contributor

Hi Kelly,

Thank you for the tip, I will test it out.

0 Kudos