---
title: "MapSourceDataEvent | 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 MapSourceDataEvent

MapSourceDataEvent: [MapLibreEvent](https://docs.maptiler.com/sdk-js/api-reference/types/MapLibreEvent/) & {  
    dataType: "source";  
    isSourceLoaded: boolean;  
    shouldReloadTileOptions: [GeoJSONSourceShouldReloadTileOptions](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GeoJSONSourceShouldReloadTileOptions/);  
    source: [SourceSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SourceSpecification/);  
    sourceDataChanged?: boolean;  
    sourceDataType: [MapSourceDataType](https://docs.maptiler.com/sdk-js/api-reference/types/MapSourceDataType/);  
    sourceId: string;  
    tile: any;  
}

The source data event interface

#### Type Declaration

-   ##### dataType: "source"
    
-   ##### isSourceLoaded: boolean
    
    True if the event has a `dataType` of `source` and the source has no outstanding network requests.
    
-   ##### shouldReloadTileOptions: [GeoJSONSourceShouldReloadTileOptions](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GeoJSONSourceShouldReloadTileOptions/)
    
    Options to determine whether a tile should be reloaded.
    
    #### Internal[](#internal)
    
-   ##### source: [SourceSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SourceSpecification/)
    
    The [style spec representation of the source](https://maplibre.org/maplibre-style-spec/#sources) if the event has a `dataType` of `source`.
    
-   ##### `Optional`sourceDataChanged?: boolean
    
-   ##### sourceDataType: [MapSourceDataType](https://docs.maptiler.com/sdk-js/api-reference/types/MapSourceDataType/)
    
-   ##### sourceId: string
    
-   ##### tile: any
    
    The tile being loaded or changed, if the event has a `dataType` of `source` and the event is related to loading of a tile.
