File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -529,7 +529,7 @@ export function addCommands(
529
529
execute : ( ) => {
530
530
const model = tracker . currentWidget ?. context . model ;
531
531
Private . removeSelectedItems ( model , 'layer' , selection => {
532
- model ?. sharedModel . removeLayer ( selection ) ;
532
+ model ?. removeLayer ( selection ) ;
533
533
} ) ;
534
534
}
535
535
} ) ;
Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ export interface IJupyterGISModel extends DocumentRegistry.IModel {
162
162
groupName ?: string ,
163
163
position ?: number
164
164
) : void ;
165
+ removeLayer ( id : string ) : void ;
165
166
getOptions ( ) : IJGISOptions ;
166
167
setOptions ( value : IJGISOptions ) : void ;
167
168
Original file line number Diff line number Diff line change @@ -343,6 +343,11 @@ export class JupyterGISModel implements IJupyterGISModel {
343
343
this . _addLayerTreeItem ( id , groupName , position ) ;
344
344
}
345
345
346
+ removeLayer ( layer_id : string ) {
347
+ this . _removeLayerTreeLayer ( this . getLayerTree ( ) , layer_id ) ;
348
+ this . sharedModel . removeLayer ( layer_id ) ;
349
+ }
350
+
346
351
setTerrain ( terrain : IJGISTerrain ) {
347
352
this . _sharedModel . terrain = terrain ;
348
353
}
You can’t perform that action at this time.
0 commit comments