One reason for this to happen is that you have copied code, and the two layers have the same name. For example, both layers will declare the same name ("vecMap") like this:
vectorMap = new AltusUnified.DynamicVectorMap("vecMap");
The two layers cannot both be named "vecMap". When a name collision like this occurs in Altus, one of the layers will not appear. Make layer names unique and the problem goes away. The same holds true for marker layers, model layers and so on.