---
title: "MapStyleDataEvent | 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.

# Class MapStyleDataEvent

The style data event

#### Hierarchy ([View Summary](https://docs.maptiler.com/sdk-js/api-reference/hierarchy/#MapStyleDataEvent))

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

##### Index

### Constructors

[constructor](#constructor)

### Properties

[dataType](#datatype) [originalEvent](#originalevent) [target](#target) [type](#type)

## Constructors

### constructor[](#constructor)

-   new MapStyleDataEvent(  
        type: "dataloading" | "data" | "styledataloading" | "styledata",  
        data?: [Omit](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Omit/)<[Partial](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Partial/)<MapStyleDataEvent\>, "type" | "dataType" | "target"\>,  
    ): MapStyleDataEvent[](#constructormapstyledataevent)
    
    #### Parameters
    
    -   type: "dataloading" | "data" | "styledataloading" | "styledata"
    -   `Optional`data: [Omit](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Omit/)<[Partial](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Partial/)<MapStyleDataEvent\>, "type" | "dataType" | "target"\>
    
    #### Returns MapStyleDataEvent
    
    Overrides [MapLibreEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapLibreEvent/).[constructor](https://docs.maptiler.com/sdk-js/api-reference/classes/MapLibreEvent/#constructor)
    

## Properties

### dataType[](#datatype)

dataType: "style"

### originalEvent[](#originalevent)

originalEvent: unknown

Inherited from [MapLibreEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapLibreEvent/).[originalEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapLibreEvent/#originalevent)

### target[](#target)

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

The object that fired the event. Set when the event is fired, and narrowed to a more specific type (e.g. `Map`, `Marker`) by the event subclasses.

Inherited from [MapLibreEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapLibreEvent/).[target](https://docs.maptiler.com/sdk-js/api-reference/classes/MapLibreEvent/#target)

### type[](#type)

type: "dataloading" | "data" | "styledataloading" | "styledata"

Overrides [MapLibreEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/MapLibreEvent/).[type](https://docs.maptiler.com/sdk-js/api-reference/classes/MapLibreEvent/#type)
