Skip to content

MLMapEventMap

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

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:178
ml-map:errorCustomEvent<MLMapErrorDetail>packages/core/src/components/ml-map.ts:163
ml-map:image-errorCustomEvent<{ name: string; url: string; }>packages/core/src/components/ml-map.ts:175
ml-map:layer-addedCustomEvent<{ layerId: string; }>packages/core/src/components/ml-map.ts:165
ml-map:layer-classifiedCustomEvent<{ classify: ClassifyRecord; layerId: string; }>packages/core/src/components/ml-map.ts:179
ml-map:layer-clickCustomEvent<{ feature: any; layerId: string; lngLat: LngLat; }>packages/core/src/components/ml-map.ts:170
ml-map:layer-data-errorCustomEvent<{ error: Error; layerId: string; }>packages/core/src/components/ml-map.ts:169
ml-map:layer-data-loadedCustomEvent<{ featureCount: number; layerId: string; }>packages/core/src/components/ml-map.ts:168
ml-map:layer-data-loadingCustomEvent<{ layerId: string; }>packages/core/src/components/ml-map.ts:167
ml-map:layer-hoverCustomEvent<{ feature: any; layerId: string; lngLat: LngLat; }>packages/core/src/components/ml-map.ts:171
ml-map:layer-removedCustomEvent<{ layerId: string; }>packages/core/src/components/ml-map.ts:166
ml-map:layer-visibilityCustomEvent<{ layerId: string; visible: boolean; }>packages/core/src/components/ml-map.ts:177
ml-map:loadCustomEvent<Record<string, never>>packages/core/src/components/ml-map.ts:162
ml-map:loadingCustomEvent<{ url: string; }>packages/core/src/components/ml-map.ts:164
ml-map:marker-clickCustomEvent<{ at: [number, number]; index: number; }>packages/core/src/components/ml-map.ts:173
ml-map:marker-icon-errorCustomEvent<{ icon: string; index: number; }>packages/core/src/components/ml-map.ts:174
ml-map:markers-addedCustomEvent<{ count: number; }>packages/core/src/components/ml-map.ts:172
ml-map:parameter-changeCustomEvent<{ key: string; value: unknown; }>packages/core/src/components/ml-map.ts:176
ml-map:source-loadedCustomEvent<{ sourceId: string; }>packages/core/src/components/ml-map.ts:183
ml-map:state-changeCustomEvent<{ changed: string[]; values: Record<string, unknown>; }>packages/core/src/components/ml-map.ts:182
ml-map:update-appliedCustomEvent<{ summary: UpdateSummary; }>packages/core/src/components/ml-map.ts:180
ml-map:update-rejectedCustomEvent<{ errors: object[]; kind: RejectionKind; }>packages/core/src/components/ml-map.ts:181