---
title: "setLight | Mobile sdk | Mobile sdk android | Android"
description: "setLight"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs-qmgv.pages.dev/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# setLight

fun [setLight](https://docs-qmgv.pages.dev/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map.style/-m-t-style/set-light/)(lightOptionsJson: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html))

Sets the global light options for the current style. Provide a JSON object string compatible with MapLibre GL Light specification. Example: { "anchor": "viewport", "intensity": 0.5 }

#### Parameters

lightOptionsJson

Raw JSON object string with light options.
