Use api for getting layer by name