---
title: "SourceEventType | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias SourceEventType

`SourceEventType` - a mapping between the source data event names and their event value. These are the events fired by a [Source](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Source/) as its data loads or changes; they also bubble up to the [Map](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/). See [MapSourceDataEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapSourceDataEvent/) for the event shape.

type SourceEventType \= {  
    [data](#data): [MapSourceDataEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapSourceDataEvent/);  
    [dataabort](#dataabort): [MapSourceDataEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapSourceDataEvent/);  
    [dataloading](#dataloading): [MapSourceDataEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapSourceDataEvent/);  
    [error](#error): [ErrorEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/ErrorEvent/);  
}

##### Index

### Properties

[data](#data) [dataabort](#dataabort) [dataloading](#dataloading) [error](#error)

## Properties

### data[](#data)

data: [MapSourceDataEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapSourceDataEvent/)

Fired when the source's data loads or changes.

### dataabort[](#dataabort)

dataabort: [MapSourceDataEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapSourceDataEvent/)

Fired when a request for the source's data is aborted.

### dataloading[](#dataloading)

dataloading: [MapSourceDataEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapSourceDataEvent/)

Fired when the source begins loading or changing data.

### error[](#error)

error: [ErrorEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/ErrorEvent/)

Fired when there's an error
