$ 0 0 Layer indices are zero-based. So if your map has, say, 3 layers, you can access them via indices 0, 1 and 2 (not 1, 2 and 3).