Skip to content

Documentation / @geoverse/core-libre / InfoWindowOptions

Interface: InfoWindowOptions ​

Defined in: packages/core-libre/src/map/infoWindow.ts:4

Extends ​

  • PopupOptions

Properties ​

anchor? ​

ts
optional anchor?: PositionAnchor;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13396

A string indicating the part of the Popup that should be positioned closest to the coordinate set via Popup.setLngLat. Options are 'center', 'top', 'bottom', 'left', 'right', 'top-left', 'top-right', 'bottom-left', and 'bottom-right'. If unset the anchor will be dynamically set to ensure the popup falls within the map container with a preference for 'bottom'.

Inherited from ​

ts
PopupOptions.anchor

className? ​

ts
optional className?: string;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13404

Space-separated CSS class names to add to popup container

Inherited from ​

ts
PopupOptions.className

closeButton? ​

ts
optional closeButton?: boolean;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13372

If true, a close button will appear in the top right corner of the popup.

Default Value ​

ts
true

Inherited from ​

ts
PopupOptions.closeButton

closeOnClick? ​

ts
optional closeOnClick?: boolean;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13377

If true, the popup will closed when the map is clicked.

Default Value ​

ts
true

Inherited from ​

ts
PopupOptions.closeOnClick

closeOnMove? ​

ts
optional closeOnMove?: boolean;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13382

If true, the popup will closed when the map moves.

Default Value ​

ts
false

Inherited from ​

ts
PopupOptions.closeOnMove

content? ​

ts
optional content?: string | HTMLElement;

Defined in: packages/core-libre/src/map/infoWindow.ts:6

弹窗内容:HTML 字符串、元素 id 或 DOM 元素


focusAfterOpen? ​

ts
optional focusAfterOpen?: boolean;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13387

If true, the popup will try to focus the first focusable element inside the popup.

Default Value ​

ts
true

Inherited from ​

ts
PopupOptions.focusAfterOpen

locationOccludedOpacity? ​

ts
optional locationOccludedOpacity?: string | number;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13423

Optional opacity when the location is behind the globe. Note that if a number is provided, it will be converted to a string.

Default Value ​

ts
undefined

Inherited from ​

ts
PopupOptions.locationOccludedOpacity

map? ​

ts
optional map?: Map$1;

Defined in: packages/core-libre/src/map/infoWindow.ts:10

创建后立即挂载到该地图(需同时提供 position)


maxWidth? ​

ts
optional maxWidth?: string;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13411

A string that sets the CSS property of the popup's maximum width, eg '300px'. To ensure the popup resizes to fit its content, set this property to 'none'. Available values can be found here: https://developer.mozilla.org/en-US/docs/Web/CSS/max-width

Default Value ​

ts
'240px'

Inherited from ​

ts
PopupOptions.maxWidth

offset? ​

ts
optional offset?: Offset;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13400

A pixel offset applied to the popup's location

Inherited from ​

ts
PopupOptions.offset

padding? ​

ts
optional padding?: PaddingOptions;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13430

A pixel padding applied to the popup's positioning constraints. The popup will be positioned to avoid being placed within this padding area from the edges of the map container.

Default Value ​

ts
undefined

Inherited from ​

ts
PopupOptions.padding

position? ​

ts
optional position?: LngLatLike;

Defined in: packages/core-libre/src/map/infoWindow.ts:8

初始位置(WGS-84 经纬度)


subpixelPositioning? ​

ts
optional subpixelPositioning?: boolean;

Defined in: node_modules/.pnpm/maplibre-gl@5.24.0/node_modules/maplibre-gl/dist/maplibre-gl.d.ts:13417

If true, rounding is disabled for placement of the popup, allowing for subpixel positioning and smoother movement when the popup is translated.

Default Value ​

ts
false

Inherited from ​

ts
PopupOptions.subpixelPositioning