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

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

# moveLayer

fun [moveLayer](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map.style/-m-t-style/move-layer/)(id: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), beforeId: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)? = null)

Moves a layer to a different z-position.

#### Parameters

id

The ID of the layer to move.

beforeId

The ID of an existing layer to insert the new layer before. If this argument is omitted, the layer will be appended to the end of the layers array.
