Skip to content

Commit

Permalink
remove layer and source
Browse files Browse the repository at this point in the history
  • Loading branch information
meghna0593 authored and plasticviking committed Jan 4, 2025
1 parent 30836a5 commit 628efac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/UI/LegacyMap/helpers/wms-layers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export const refreshWMSOnToggle = (simplePickerLayers2, map) => {
export const hideWMSIfUnauthorized = (simplePickerLayers2, map) => {
simplePickerLayers2.map((layer) => {
if (map.getLayer(layer.url)) {
map.setLayoutProperty(layer.url, 'visibility', 'none');
map.moveLayer(layer.url, LAYER_Z_MID);
map.removeLayer(layer.url);
map.removeSource(layer.url);
}
});
};

0 comments on commit 628efac

Please sign in to comment.