Zum Inhalt

@smartmaps/smartmaps-gl


@smartmaps/smartmaps-gl / ContextMenuItem

Type Alias: ContextMenuItem

Nur auf Englisch verfügbar

Diese Seite gehört zur technischen API-Referenz. Sie wird automatisch aus dem Quellcode erzeugt und liegt daher ausschließlich auf Englisch vor. Die einführenden Seiten und Leitfäden sind auf Deutsch verfügbar.

ContextMenuItem = object

The ContextMenu item object

Properties

action

action: string

An identifier for the action associated with this menu item

Remarks

must be unique


handler?

optional handler?: (coords, map) => void

The callback function executed when the menu item is clicked

Parameters

coords

LngLat

The geographic coordinates where the menu was triggered

map

Map

The instance of the map where the interaction occurred

Returns

void


label

label: string

The display text shown to the user in the context menu