> For AI agents: the complete documentation index is available at /apps-plugin/docs/llms.txt, the full documentation bundle is available at /apps-plugin/docs/llms-full.txt.

# map-marker

地图标记点组件，作为 Map 的子组件使用，支持自定义图标和动画。

<iframe src="https://developer.doubao.com/docs-preview/component-simulator/?caseId=map-marker"
  title="组件示例 map-marker"
  width="100%"
  height="700"
  loading="lazy"
  style="width:100%;height:700px;border:0;border-radius:16px;overflow:hidden;"
></iframe>

## 扫码预览

![扫码预览 map-marker](https://api.qrserver.com/v1/create-qr-code/?size=200x200\&data=doubao%3A%2F%2Fdoubao_apps%3Fapp_id%3Ddb_1McM5Ni%26path%3D%252Fpages%252Fcomponent%252Fmap-marker%252Findex)

## Props

<table>
<thead>
<tr><th width="140">属性名</th><th width="240">类型</th><th width="120">默认值</th><th width="80">必填</th><th width="360">说明</th></tr>
</thead>
<tbody>
<tr><td>alpha</td><td><code>number</code></td><td>-</td><td>否</td><td>标记点透明度。</td></tr>
<tr><td>anchor</td><td><code>[number, number]</code></td><td>-</td><td>否</td><td>经纬度在标注图标的锚点。</td></tr>
<tr><td>animate</td><td><code>MapMarkerAnimate</code></td><td>-</td><td>否</td><td>标记点动画配置。多个动画属性会并行执行。</td></tr>
<tr><td>children</td><td><code>ReactNode</code></td><td>-</td><td>是</td><td>标记点的自定义 UI 内容。<strong>必填 - 必须提供自定义标记点 UI</strong></td></tr>
<tr><td>clickable</td><td><code>boolean</code></td><td>true</td><td>否</td><td>标记点是否可点击，设为 false 时，点击标记点会触发地图的 onClick 事件。</td></tr>
<tr><td>containerPosition</td><td><code>{ x: number; y: number }</code></td><td>-</td><td>否</td><td>标记点在自定义布局中的容器位置，使用像素坐标 <code>{ x, y }</code>。</td></tr>
<tr><td>draggable</td><td><code>boolean</code></td><td>false</td><td>否</td><td>标记点是否可拖拽。</td></tr>
<tr><td>enableCollideWithPoi</td><td><code>boolean</code></td><td>false</td><td>否</td><td>标记点是否参与 POI 碰撞避让。</td></tr>
<tr><td>key</td><td><code>string | number | null</code></td><td>-</td><td>否</td><td>React key 属性</td></tr>
<tr><td>onClick</td><td><code>() =&gt; void</code></td><td>-</td><td>否</td><td>点击事件处理函数。</td></tr>
<tr><td>position</td><td><code>LatLng</code></td><td>-</td><td>是</td><td>标记点坐标。</td></tr>
<tr><td>ref</td><td><code>Ref&lt;MapMarkerRef&gt;</code></td><td>-</td><td>否</td><td>用于获取组件实例的 ref</td></tr>
<tr><td>rotation</td><td><code>number</code></td><td>-</td><td>否</td><td>标记点旋转角度。</td></tr>
<tr><td>style</td><td><code>CSSProperties</code></td><td>-</td><td>否</td><td>组件的样式。</td></tr>
</tbody>
</table>
