---
title: "MapboxAttributionControl"
description: "版权信息控件，展示数据来源署名，支持折叠与自定义版权文本。"
seo_title: "MapboxAttributionControl Component"
seo_description: "MapboxAttributionControl displays data source attribution with compact-mode collapsing and custom attribution text via options."
canonical_url: "https://mapbox.mhaibaraai.cn/docs/controls/attribution"
---
# MapboxAttributionControl

> 版权信息控件，展示数据来源署名，支持折叠与自定义版权文本。

## 简介

`MapboxAttributionControl` 在地图角落展示数据来源署名。`options.compact` 折叠为可展开的图标按钮，`options.customAttribution` 追加自定义版权文本（字符串或字符串数组）。

> \[\!TIP\]
> 
> 样式或数据源自带的署名通常已自动显示；本控件用于自定义展示形态或补充版权。

## 用法

折叠模式并追加自定义版权：

```vue [AttributionControlExample.vue]
<template>
  <div class="h-115 w-full overflow-hidden rounded-(--ui-radius) border border-default">
    <MapboxMap :options="{ style: 'mapbox://styles/mapbox/light-v11', center: [116.39, 39.91], zoom: 10 }">
      <!-- compact 折叠为图标按钮，customAttribution 追加自定义版权 -->
      <MapboxAttributionControl
        position="bottom-right"
        :options="{ compact: true, customAttribution: '© MOVK Mapbox' }"
      />
    </MapboxMap>
  </div>
</template>
```

## API

### Props

```ts
/**
 * Props for the MapboxAttributionControl component
 */
interface MapboxAttributionControlProps {
  /**
   * 控件停靠位置；省略用地图默认位置
   */
  position?: mapboxgl.ControlPosition | undefined;
  /**
   * AttributionControl 构造选项
   */
  options?: mapboxgl.AttributionControlOptions | undefined;
}
```

## Changelog

See commit history for [src/runtime/components/controls/AttributionControl.vue](https://github.com/mhaibaraai/movk-mapbox/commits/main/src/runtime/components/controls/AttributionControl.vue).


## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
