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?
Solved! Go to Solution.
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
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
Edward Wong
Eagle Technology NZ, ESRI Distributor for NZ and South Pacific
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.
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.
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
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
Edward Wong
Eagle Technology NZ, ESRI Distributor for NZ and South Pacific
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 });