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

# addSource

fun [addSource](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map.style/-m-t-style/add-source/)(source: [MTSource](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map.style.source/-m-t-source/))

Adds a source to the map.

#### Parameters

source

Source to be added.

#### Throws

[MTStyleError.SourceAlreadyExists](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.map.style/-m-t-style-error/-source-already-exists/)

if source with the same id is already added to the map.
