I have a program with two vector layers, but the second vector layer does not appear. How do I fix it?

0 votes
asked May 10, 2016 by ba3user (4,000 points)
If I comment one layer out, the other appears find. It is only when both are displayed simultaneously that one layer does not appear.

1 Answer

0 votes
answered May 10, 2016 by ba3user (4,000 points)
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.
...