> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/android/ja/maps/llms.txt)

# External Vector Source

![Add a third party vector tile source.](https://docs.mapbox.com/android/ja/assets/ideal-img/maps-examples-external-vector-source.65c0e64.480.png)

This example demonstrates how to render vector tiles using a third-party vector tile source on a map using the **Mapbox Maps SDK for Android**. The activity named `ThirdPartyVectorSourceActivity` sets up the map view and loads the Mapbox map with vector tiles provided by Mapillary through the [`addSource`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.sources/add-source.html) method. The vector tiles are sourced from Mapillary's URL and styled with specified zoom levels and layer properties.

The map is configured to display a line layer using [`lineLayer`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.layers.generated/-line-layer/), defining attributes such as [`lineCap`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.layers.generated/-line-layer/line-cap.html), [`lineJoin`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.layers.generated/-line-layer/line-join.html), [`lineOpacity`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.layers.generated/-line-layer/line-opacity.html), [`lineColor`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.layers.generated/-line-layer/line-color.html), and [`lineWidth`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.layers.generated/-line-layer/line-width.html). These features are added to the map's style below a specific layer using [`addLayerBelow`](https://docs.mapbox.com/android/maps/api/latest/mapbox-maps-android/com.mapbox.maps.extension.style.layers/add-layer-below.html).

> **Note: Android Examples App Available**
> 
> This example code is part of the **Maps SDK for Android Examples App**, a working Android project [available on GitHub](https://github.com/mapbox/mapbox-maps-android/tree/v11.35.2/). Android developers are encouraged to run the examples app locally to interact with this example in an emulator and explore other features of the Maps SDK.
> 
> See our [Run the Maps SDK for Android Examples App](https://docs.mapbox.com/help/tutorials/maps-sdk-android-examples-app/) tutorial for step-by-step instructions.

**Kotlin**

Title: `ThirdPartyVectorSourceActivity.kt`

[View on GitHub](https://github.com/mapbox/mapbox-maps-android/blob/v11.35.2/app/src/main/java/com/mapbox/maps/testapp/examples/style/ThirdPartyVectorSourceActivity.kt)

```kt
package com.mapbox.maps.testapp.examples.style

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.mapbox.bindgen.Value
import com.mapbox.geojson.Point
import com.mapbox.maps.*
import com.mapbox.maps.extension.style.expressions.generated.Expression
import com.mapbox.maps.extension.style.layers.addLayer
import com.mapbox.maps.extension.style.layers.generated.lineLayer
import com.mapbox.maps.extension.style.layers.properties.generated.LineCap
import com.mapbox.maps.extension.style.layers.properties.generated.LineJoin
import com.mapbox.maps.extension.style.sources.addSource
import com.mapbox.maps.extension.style.sources.generated.vectorSource

/**
 * Activity renders vector tiles using a third party vector tile source.
 *
 * In this case, Mapillary provides the vector tiles, which are added to the map using addSource.
 */
class ThirdPartyVectorSourceActivity : AppCompatActivity() {

  private lateinit var mapboxMap: MapboxMap

  override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    val mapView = MapView(this)
    setContentView(mapView)
    mapboxMap = mapView.mapboxMap

    mapboxMap.setCamera(
      CameraOptions.Builder()
        .zoom(12.0)
        .center(Point.fromLngLat(-87.622088, 41.878781))
        .build()
    )

    mapboxMap.loadStyle(Style.STANDARD) {
      it.addSource(
        vectorSource(SOURCE_ID) {
          tiles(listOf("https://tiles.mapillary.com/maps/vtp/mly1_public/2/{z}/{x}/{y}?access_token=MLY|4142433049200173|72206abe5035850d6743b23a49c41333"))
          minzoom(6)
          maxzoom(14)
        }
      )

      it.addLayer(
        lineLayer(LAYER_ID, SOURCE_ID) {
          sourceLayer(SOURCE_LAYER_ID)
          lineCap(LineCap.ROUND)
          lineJoin(LineJoin.ROUND)
          lineOpacity(0.6)
          lineColor(Expression.rgb(53.0, 175.0, 109.0))
          lineWidth(2.0)
          slot("middle")
        }
      )
      mapboxMap.setStyleImportConfigProperty("basemap", "theme", Value.valueOf("monochrome"))
    }
  }

  private companion object {
    const val SOURCE_ID = "mapillary"
    const val LAYER_ID = SOURCE_ID
    const val TAG = SOURCE_ID
    const val SOURCE_LAYER_ID = "sequence"
  }
}
```