Home > @magiclane/maps-sdk > GemMap > showPopup

GemMap.showPopup() method

Open a popup anchored at coords. A STRING is treated as HTML (sanitize untrusted input); an HTMLElement is attached as-is. Multiple popups may be open simultaneously.

Signature:

showPopup(coords: Coordinates, content: string | HTMLElement, options?: PopupOptions): Popup;

Parameters

Parameter

Type

Description

coords

Coordinates

The coordinate the popup points at.

content

string | HTMLElement

HTML string or element for the popup body.

options

PopupOptions

(Optional) Anchor side, offset, close behavior, max width.

Returns:

Popup

The popup handle (setContent / setCoordinates / close / isOpen).