LayerDef: string | LayerAdapter

Available argument types for methods with map layers identification.

webMap.addLayer('GEOJSON', { id: 'my_layer' }).then((layer) =>{
webMap.addLayerData(layer, geojson);
webMap.addLayerData('my_layer', geojson);
});