wawanopoulos
wawanopoulos

Reputation: 9804

Mapbox Android : Adjust Opacity of background layer

I'm searching the way to adjust the opacity of the mapbox map. In the following example, layers[0] refers to the background layer.

mapboxMap.style!!.layers[0]?.setProperties(rasterOpacity(0.3f))

Applying this code has no effect. What is wrong ?

Upvotes: 4

Views: 451

Answers (1)

Vedant
Vedant

Reputation: 468

style.getLayer("layer_name").setProperties(
   rasterOpacity(0.3)
)

Upvotes: 2

Related Questions