Skip to content

MLMapEventMap

Defined in: packages/core/src/components/ml-map.ts:92

Every event <ml-map> dispatches, by name, typed with its detail. All of them bubble.

Drives the typed addEventListener overloads on MLMap and the React 19 onml-map:* props in @maplibre-yaml/core/react. A test pins its keys to the new CustomEvent("ml-map:…") calls in this file, so the map cannot drift from what the element actually fires.

PropertyTypeDefined in
ml-map:camera-fitCustomEvent<{ bounds: Bounds; source: string; }>packages/core/src/components/ml-map.ts:109
ml-map:errorCustomEvent<MLMapErrorDetail>packages/core/src/components/ml-map.ts:94
ml-map:image-errorCustomEvent<{ name: string; url: string; }>packages/core/src/components/ml-map.ts:106
ml-map:layer-addedCustomEvent<{ layerId: string; }>packages/core/src/components/ml-map.ts:96
ml-map:layer-clickCustomEvent<{ feature: any; layerId: string; lngLat: LngLat; }>packages/core/src/components/ml-map.ts:101
ml-map:layer-data-errorCustomEvent<{ error: Error; layerId: string; }>packages/core/src/components/ml-map.ts:100
ml-map:layer-data-loadedCustomEvent<{ featureCount: number; layerId: string; }>packages/core/src/components/ml-map.ts:99
ml-map:layer-data-loadingCustomEvent<{ layerId: string; }>packages/core/src/components/ml-map.ts:98
ml-map:layer-hoverCustomEvent<{ feature: any; layerId: string; lngLat: LngLat; }>packages/core/src/components/ml-map.ts:102
ml-map:layer-removedCustomEvent<{ layerId: string; }>packages/core/src/components/ml-map.ts:97
ml-map:layer-visibilityCustomEvent<{ layerId: string; visible: boolean; }>packages/core/src/components/ml-map.ts:108
ml-map:loadCustomEvent<Record<string, never>>packages/core/src/components/ml-map.ts:93
ml-map:loadingCustomEvent<{ url: string; }>packages/core/src/components/ml-map.ts:95
ml-map:marker-clickCustomEvent<{ at: [number, number]; index: number; }>packages/core/src/components/ml-map.ts:104
ml-map:marker-icon-errorCustomEvent<{ icon: string; index: number; }>packages/core/src/components/ml-map.ts:105
ml-map:markers-addedCustomEvent<{ count: number; }>packages/core/src/components/ml-map.ts:103
ml-map:parameter-changeCustomEvent<{ key: string; value: unknown; }>packages/core/src/components/ml-map.ts:107