Interface MapPopupProps

Components that implement this interface display a popup directly on the map.

interface MapPopupProps {
    lngLat: LngLatLike;
    obj?: ((obj) => void);
    onClose?: ((...args) => void);
    options?: PopupOptions;
}

Hierarchy (view full)

Properties

lngLat: LngLatLike

The location of the popup on the map.

obj?: ((obj) => void)

Invoked to pass the Mapbox control to the function provider, typically the parent React component.

Type declaration

    • (obj): void
    • Parameters

      • obj: Popup

        An instance of the type of the Mapbox control that backs the React component.

      Returns void

onClose?: ((...args) => void)

Invoked when the popup is closed.

Type declaration

    • (...args): void
    • Parameters

      • Rest ...args: unknown[]

        Any args from the close event will be passed to onClose.

      Returns void

options?: PopupOptions

Options that affect the display of the popup.