You are right to trigger the FEATURES search only after all layers of the PL are loaded, but I doubt that this $watch triggers after all PL layers are loaded.

Also, if we have no layers at all (not even bgLayer) in the PL, this will only trigger after user actively selects a layer and thus completing the swisssearch functionality. I don't think that's what we want.

I think the best would be to look for the 'layers' parameter in the PL and assure to launch the search when all of those layers are loaded.

Maybe best discussed eye-to-eye.