use layer registry instead of legend