Skip to content

Commit

Permalink
fix(add-data): Dont allow loading of features into internal layers
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipLeitner committed Mar 19, 2024
1 parent 9604451 commit b9e9aa6
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {HsUploadComponent, HsUploadedFiles} from 'hslayers-ng/common/upload';
import {HsUtilsService} from 'hslayers-ng/shared/utils';
import {VectorFileDataType} from '../../common/advanced-options/advanced-options.component';
import {accessRightsModel} from 'hslayers-ng/types';
import {getShowInLayerManager} from 'hslayers-ng/common/extensions';

@Component({
selector: 'hs-file-vector',
Expand Down Expand Up @@ -257,7 +258,11 @@ export class HsAddDataVectorFileComponent
if (type == 'existing') {
this.data.vectorLayers = this.hsLayerManagerService.data.layers.filter(
(layer) => {
return this.hsLayerUtilsService.isLayerVectorLayer(layer.layer);
const showInLM = getShowInLayerManager(layer.layer);
return (
this.hsLayerUtilsService.isLayerVectorLayer(layer.layer) &&
(showInLM || showInLM === undefined)
);
},
);
}
Expand Down

0 comments on commit b9e9aa6

Please sign in to comment.