@@ -278,7 +278,7 @@ export function addCommands(
278278 * Source and layers
279279 */
280280 commands . addCommand ( CommandIDs . newRasterEntry , {
281- label : trans . __ ( 'New Raster Layer' ) ,
281+ label : trans . __ ( 'New Raster Tile Layer' ) ,
282282 isEnabled : ( ) => {
283283 return tracker . currentWidget
284284 ? tracker . currentWidget . model . sharedModel . editable
@@ -287,14 +287,14 @@ export function addCommands(
287287 execute : Private . createEntry ( {
288288 tracker,
289289 formSchemaRegistry,
290- title : 'Create Raster Layer' ,
290+ title : 'Create Raster Tile Layer' ,
291291 createLayer : true ,
292292 createSource : true ,
293293 sourceData : {
294294 minZoom : 0 ,
295295 maxZoom : 24
296296 } ,
297- layerData : { name : 'Custom Raster Layer' } ,
297+ layerData : { name : 'Custom Raster Tile Layer' } ,
298298 sourceType : 'RasterSource' ,
299299 layerType : 'RasterLayer'
300300 } ) ,
@@ -508,133 +508,7 @@ export function addCommands(
508508 ...icons . get ( CommandIDs . newGeoTiffEntry )
509509 } ) ;
510510
511- // Layers only
512- commands . addCommand ( CommandIDs . newRasterLayer , {
513- label : args =>
514- args . from === 'contextMenu'
515- ? trans . __ ( 'Raster' )
516- : trans . __ ( 'Add Raster layer' ) ,
517- isEnabled : ( ) => {
518- return tracker . currentWidget
519- ? tracker . currentWidget . model . sharedModel . editable
520- : false ;
521- } ,
522- execute : Private . createEntry ( {
523- tracker,
524- formSchemaRegistry,
525- title : 'Create Raster Layer' ,
526- createLayer : true ,
527- createSource : false ,
528- layerData : {
529- name : 'Custom Raster Layer'
530- } ,
531- sourceType : 'RasterSource' ,
532- layerType : 'RasterLayer'
533- } ) ,
534- ...icons . get ( CommandIDs . newVectorLayer )
535- } ) ;
536-
537- commands . addCommand ( CommandIDs . newVectorLayer , {
538- label : args =>
539- args . from === 'contextMenu'
540- ? trans . __ ( 'Vector' )
541- : trans . __ ( 'Add New Vector layer' ) ,
542- isEnabled : ( ) => {
543- return tracker . currentWidget
544- ? tracker . currentWidget . model . sharedModel . editable
545- : false ;
546- } ,
547- execute : Private . createEntry ( {
548- tracker,
549- formSchemaRegistry,
550- title : 'Create Vector Layer' ,
551- createLayer : true ,
552- createSource : false ,
553- layerData : {
554- name : 'Custom Vector Layer'
555- } ,
556- sourceType : 'VectorTileSource' ,
557- layerType : 'VectorTileLayer'
558- } ) ,
559- ...icons . get ( CommandIDs . newVectorLayer )
560- } ) ;
561-
562- commands . addCommand ( CommandIDs . newHillshadeLayer , {
563- label : args =>
564- args . from === 'contextMenu'
565- ? trans . __ ( 'Hillshade' )
566- : trans . __ ( 'Add Hillshade layer' ) ,
567- isEnabled : ( ) => {
568- return tracker . currentWidget
569- ? tracker . currentWidget . model . sharedModel . editable
570- : false ;
571- } ,
572- execute : Private . createEntry ( {
573- tracker,
574- formSchemaRegistry,
575- title : 'Create Hillshade Layer' ,
576- createLayer : true ,
577- createSource : false ,
578- layerData : {
579- name : 'Custom Hillshade Layer'
580- } ,
581- sourceType : 'RasterDemSource' ,
582- layerType : 'HillshadeLayer'
583- } ) ,
584- ...icons . get ( CommandIDs . newHillshadeLayer )
585- } ) ;
586-
587- commands . addCommand ( CommandIDs . newImageLayer , {
588- label : args =>
589- args . from === 'contextMenu'
590- ? trans . __ ( 'Image' )
591- : trans . __ ( 'Add Image layer' ) ,
592- isEnabled : ( ) => {
593- return tracker . currentWidget
594- ? tracker . currentWidget . model . sharedModel . editable
595- : false ;
596- } ,
597- execute : Private . createEntry ( {
598- tracker,
599- formSchemaRegistry,
600- title : 'Create Image Layer' ,
601- createLayer : true ,
602- createSource : false ,
603- layerData : {
604- name : 'Custom Image Layer'
605- } ,
606- sourceType : 'ImageSource' ,
607- layerType : 'RasterLayer'
608- } ) ,
609- ...icons . get ( CommandIDs . newImageLayer )
610- } ) ;
611-
612- commands . addCommand ( CommandIDs . newVideoLayer , {
613- label : args =>
614- args . from === 'contextMenu'
615- ? trans . __ ( 'Video' )
616- : trans . __ ( 'Add Video layer' ) ,
617- isEnabled : ( ) => {
618- return tracker . currentWidget
619- ? tracker . currentWidget . model . sharedModel . editable
620- : false ;
621- } ,
622- execute : Private . createEntry ( {
623- tracker,
624- formSchemaRegistry,
625- title : 'Create Video Layer' ,
626- createLayer : true ,
627- createSource : false ,
628- layerData : {
629- name : 'Custom Video Layer'
630- } ,
631- sourceType : 'VideoSource' ,
632- layerType : 'RasterLayer'
633- } ) ,
634- ...icons . get ( CommandIDs . newVideoLayer )
635- } ) ;
636-
637- commands . addCommand ( CommandIDs . newShapefileLayer , {
511+ commands . addCommand ( CommandIDs . newShapefileEntry , {
638512 label : trans . __ ( 'New Shapefile Layer' ) ,
639513 isEnabled : ( ) => {
640514 return tracker . currentWidget
@@ -652,30 +526,7 @@ export function addCommands(
652526 sourceType : 'ShapefileSource' ,
653527 layerType : 'VectorLayer'
654528 } ) ,
655- ...icons . get ( CommandIDs . newShapefileLayer )
656- } ) ;
657-
658- commands . addCommand ( CommandIDs . newHeatmapLayer , {
659- label : args =>
660- args . from === 'contextMenu'
661- ? trans . __ ( 'Heatmap' )
662- : trans . __ ( 'Add HeatmapLayer' ) ,
663- isEnabled : ( ) => {
664- return tracker . currentWidget
665- ? tracker . currentWidget . model . sharedModel . editable
666- : false ;
667- } ,
668- execute : Private . createEntry ( {
669- tracker,
670- formSchemaRegistry,
671- title : 'Create Heatmap Layer' ,
672- createLayer : true ,
673- createSource : false ,
674- layerData : { name : 'Custom Heatmap Layer' } ,
675- sourceType : 'GeoJSONSource' ,
676- layerType : 'HeatmapLayer'
677- } ) ,
678- ...icons . get ( CommandIDs . newHeatmapLayer )
529+ ...icons . get ( CommandIDs . newShapefileEntry )
679530 } ) ;
680531
681532 /**
0 commit comments