Select to view content in your preferred language

Disable Zoom Animations in Experience Builder

355
4
Jump to solution
02-13-2025 07:40 AM
Brian_McLeer
Frequent Contributor

In our search widget, we have it configured so the initial search will zoom to the feature. The request from a user has come in to disable the zoom out / zoom in animation when searching for subsequent features in the search widget (as the video shows).

Below are my current settings in the search widget actions settings. When a record selection changes, it zooms to it which would explain the behavior. However, there is not a "pan to" option. Would anyone have any insight as to how to get the initial search to zoom to, but subsequent to just go to the feature without any animation? 

Brian_McLeer_0-1739461143213.png

 

Brian
0 Kudos
1 Solution

Accepted Solutions
Edward_Wong
Occasional Contributor

Yes Jeffrey is right, it looks like an animation but its actually goTo(). You can either wrap/extend the ExB Search Widget or wrap the MapSDK for JS SearchWidget. Both could works. ExB extended the JS Search anyway.

https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html

Edward_Wong_0-1739496580080.png

From memory I played with this goToOverride in ExB dev edition for our SearchWidget and yes u can change the behaviour - to specific location or just pass.

or this

jimuMapView.view.goTo(item.extent, { animate: false });



Edward Wong

Eagle Technology NZ, ESRI Distributor for NZ and South Pacific

View solution in original post

4 Replies
JeffreyThompson2
MVP Frequent Contributor

I know you are on Developer Edition. This is going to take some messing about with the Javascript API. The simplest option will probably involve copying the Search Widget and making your own Zoom To function using the goTo() function from the API. This function has a Boolean called animate that can be disabled. You might also be able to muck around with the reduced motion options

GIS Developer
City of Arlington, Texas
Brian_McLeer
Frequent Contributor

Thank you @JeffreyThompson2, I will look into copying the widget. I was hoping to use the out of the box widget but may not be feasible.  

Brian
0 Kudos
Edward_Wong
Occasional Contributor

Yes Jeffrey is right, it looks like an animation but its actually goTo(). You can either wrap/extend the ExB Search Widget or wrap the MapSDK for JS SearchWidget. Both could works. ExB extended the JS Search anyway.

https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Search.html

Edward_Wong_0-1739496580080.png

From memory I played with this goToOverride in ExB dev edition for our SearchWidget and yes u can change the behaviour - to specific location or just pass.

or this

jimuMapView.view.goTo(item.extent, { animate: false });



Edward Wong

Eagle Technology NZ, ESRI Distributor for NZ and South Pacific

Brian_McLeer
Frequent Contributor

Thank you, @Edward_Wong. I ended up going with your second recommendation below and the animation is now disabled. Thank you for the input. 

jimuMapView.view.goTo(item.extent, { animate: false }); 

Brian
0 Kudos