---
title: "<ScriptMapLibrePopup>"
description: "在 MapLibre Popup 中渲染插槽 HTML。将其嵌套在标记内，或传入 position 以创建独立弹出窗口。使用响应式 open 属性控制可见性。"
canonical_url: "https://nuxt-scripts.zhcndoc.com/scripts/maplibre/api/popup"
last_updated: "2026-08-11T09:33:18.281Z"
---

在 MapLibre `Popup` 中渲染插槽 HTML。将其嵌套在标记内，或传入 `position` 以创建独立弹出窗口。使用响应式 `open` 属性控制可见性。

`new maplibregl.Popup()` 会在创建时读取 `options` 对象。由 MapLibre 公共 setter 支持的选项也会响应式更新：`className`、`maxWidth`、`offset`、`padding` 和 `subpixelPositioning`。其他选项仅在初始化时生效。

<script-types filter="ScriptMapLibrePopup" script-key="maplibre">



</script-types>
