How do I change the transparency of a polygon? I want to be able to see the map under a polygon.

0 votes
asked Mar 14, 2022 by ba3user (4,000 points)

1 Answer

0 votes
answered Mar 14, 2022 by ba3user (4,000 points)

Lines, polygons and models in Altus all have the ability to be transparent, with the degree of transparency or opacity set with the alpha channel. There is also a way to set the transparency of a whole map layer.

To make a single polygon transparent you can set the alpha color value to something less than 255: 

var colors3 = [new AltusUnified.Color(100, 200, 80, 99), new AltusUnified.Color(10, 100, 80, 99), new AltusUnified.Color(10, 100, 100, 99)]; 

var polygonStyle = new AltusUnified.PolygonStyle(colors3[0], colors3[1], 8, colors3[2], 2);

The value 99 is the alpha value. 0 is completely transparent (invisible). 255 is completely opaque.

...