> For the complete documentation index, see [llms.txt](https://nostramap-doc.fatos.biz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nostramap-doc.fatos.biz/fatos-api/map/map-control/theme.md).

# Theme

## Set map theme <a href="#set-map-theme" id="set-map-theme"></a>

| Parameter | Description                                       | Type   |
| --------- | ------------------------------------------------- | ------ |
| theme     | <p>basic</p><p>satellite   // Satellite theme</p> | String |

{% tabs %}
{% tab title="Before loading the map" %}

```
let LatLng = {lat: 37.482890, lng: 126.896086}
let mapInstance = new fatosmap.maps.Map(
    document.getElementById("app"),
    {
        zoom: 14,
        center: LatLng,
        maxZoom: 20,
        minZoom: 2,
        key: 'YOUR_API_KEY'
        
        // theme
        theme: 'satellite' Default basic
    }
)
```

{% endtab %}

{% tab title="After loading the map" %}

```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Map Event</title>
</head>
<body>
<div style="height: 100vh">
    <div id="app"></div>
</div>
<button style="position: absolute; float: top; top: 50px; left: 50px;" onclick="setTheme()">Set Theme</button>
<button style="position: absolute; float: top; top: 50px; left: 150px;" onclick="getTheme()">Get Theme</button>
<button style="position: absolute; float: top; top: 100px; left: 50px;" onclick="showTraffic(true)">Show Traffic Line</button>
<button style="position: absolute; float: top; top: 100px; left: 200px;" onclick="showTraffic(false)">Remove Traffic Line</button>
<script type="text/javascript" src="https://maps.fatos.biz/dist/fatosmap-gl.js"></script>
<script>
    let LatLng = {lat: 37.482901, lng: 126.896038};
    let mapInstance = new fatosmap.maps.Map(
        document.getElementById("app"),
        {
            zoom: 14.5,
            center: LatLng,
            maxZoom: 20,
            minZoom: 2,
            key: 'YOUR_API_KEY'
        }
    );
    function setTheme() {
        mapInstance.setTheme('basic');
    }
    function getTheme() {
        console.log(mapInstance.getTheme());
    }
    function showTraffic(bool) {
        mapInstance.setTraffic(bool)
    }
</script>
</body>
</html>
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://nostramap-doc.fatos.biz/fatos-api/map/map-control/theme.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
