I'm trying to figure out how to alter the javascript code in a web appbuilder app to make is so when the user clicks on a feature it zooms to that feature immediately without the popup. I found this article but I'm not sure where or how I would add the code to the web app scripts. Any ideas?
https://community.esri.com/thread/177400#comments
Solved! Go to Solution.
Greetings Robert,
Quick question in regards to doing the same this using Portal. Would there be a change in the code? I decided to do a very similar deployment on portal (rather than using arcgis online) but the code doesnt seem to work. After pasting the code, the map fails to draw. please see below portal code:
Portals code base is minified and Portal is normally a couple of versions behind the current release of WAB.
Awesome! Thank you so much Robert. I had to change the zoom level to 16 but that worked perfectly.
Troy,
I do not see where you change the code to look for a layer name in your app...
if(layerObject.name === "Highway - Road Signs"){
I.e
if(layerObject.name === "Plants - Test"){
Hi Robert,
I know this is a pretty old post but I am trying to utilize this solution in WAB 2.19 and it's not doing anything for me. I am using a feature service and I don't have any errors showing in developer tools. Would it make a difference if it's a hosted feature service? Thanks for your help!
Scott