diff --git a/app/client/src/contexts/locationSearch.js b/app/client/src/contexts/locationSearch.js index f761558bf..1d85ac00e 100644 --- a/app/client/src/contexts/locationSearch.js +++ b/app/client/src/contexts/locationSearch.js @@ -373,7 +373,7 @@ export class LocationSearchProvider extends Component { // reset the zoom and home widget to the initial extent if (useDefaultZoom && mapView) { - mapView.extent = initialExtent(); + mapView.goTo(initialExtent()); if (homeWidget) { homeWidget.viewpoint = initialViewpoint(); diff --git a/app/client/src/utils/hooks.ts b/app/client/src/utils/hooks.ts index 5fe9474a6..ad83e37fc 100644 --- a/app/client/src/utils/hooks.ts +++ b/app/client/src/utils/hooks.ts @@ -1009,9 +1009,6 @@ function useSharedLayers({ }); setLayer('wsioHealthIndexLayer', wsioHealthIndexLayer); - setResetHandler('wsioHealthIndexLayer', () => { - wsioHealthIndexLayer.visible = false; - }); // Toggles the shading of the watershed graphic based on // whether or not the wsio layer is on or off @@ -1063,9 +1060,6 @@ function useSharedLayers({ }); setLayer('protectedAreasLayer', protectedAreasLayer); - setResetHandler('protectedAreasLayer', () => { - protectedAreasLayer.visible = false; - }); return protectedAreasLayer; } @@ -1109,11 +1103,6 @@ function useSharedLayers({ }, }); setLayer('wildScenicRiversLayer', wildScenicRiversLayer); - setResetHandler('wildScenicRiversLayer', () => { - setTimeout(() => { - wildScenicRiversLayer.visible = false; - }, 100); - }); return wildScenicRiversLayer; }