---
title: "Style | 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 Style`Maptiler`

The Style base class

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

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

##### Index

### Constructors[](#constructors)

[constructor](#constructor)

### Properties[](#properties)

[crossTileSymbolIndex](#crosstilesymbolindex) [dispatcher](#dispatcher) [glyphManager](#glyphmanager) [imageManager](#imagemanager) [light](#light) [lineAtlas](#lineatlas) [map](#map) [pauseablePlacement](#pauseableplacement) [placement](#placement) [projection](#projection) [sky](#sky) [stylesheet](#stylesheet) [tileManagers](#tilemanagers) [z](#z) [zoomHistory](#zoomhistory)

### Methods[](#methods)

[addImage](#addimage) [addLayer](#addlayer) [addSource](#addsource) [addSprite](#addsprite) [destroy](#destroy) [fire](#fire) [getDashes](#getdashes) [getFeatureState](#getfeaturestate) [getFilter](#getfilter) [getGlobalState](#getglobalstate) [getGlyphs](#getglyphs) [getGlyphsUrl](#getglyphsurl) [getImage](#getimage) [getImages](#getimages) [getLayer](#getlayer) [getLayersOrder](#getlayersorder) [getLayoutProperty](#getlayoutproperty) [getLight](#getlight) [getPaintProperty](#getpaintproperty) [getProjection](#getprojection) [getSky](#getsky) [getSource](#getsource) [getSprite](#getsprite) [getTransition](#gettransition) [hasLayer](#haslayer) [hasTransitions](#hastransitions) [listens](#listens) [listImages](#listimages) [loaded](#loaded) [loadEmpty](#loadempty) [loadJSON](#loadjson) [loadURL](#loadurl) [moveLayer](#movelayer) [off](#off) [on](#on) [once](#once) [queryRenderedFeatures](#queryrenderedfeatures) [querySourceFeatures](#querysourcefeatures) [removeFeatureState](#removefeaturestate) [removeImage](#removeimage) [removeLayer](#removelayer) [removeSource](#removesource) [removeSprite](#removesprite) [serialize](#serialize) [setEventedParent](#seteventedparent) [setFeatureState](#setfeaturestate) [setFilter](#setfilter) [setGeoJSONSourceData](#setgeojsonsourcedata) [setGlobalState](#setglobalstate) [setGlobalStateProperty](#setglobalstateproperty) [setGlyphs](#setglyphs) [setLayerZoomRange](#setlayerzoomrange) [setLayoutProperty](#setlayoutproperty) [setLight](#setlight) [setPaintProperty](#setpaintproperty) [setProjection](#setprojection) [setSky](#setsky) [setSprite](#setsprite) [setState](#setstate) [update](#update) [updateImage](#updateimage)

## Constructors[](#constructors-1)

### `Maptiler`constructor[](#constructor)

-   new Style(map: [Map](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/), options?: [StyleOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleOptions/)): Style[](#constructorstyle)
    
    #### Parameters
    
    -   map: [Map](https://docs.maptiler.com/sdk-js/api-reference/classes/Map/)
    -   options: [StyleOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleOptions/) = {}
    
    #### Returns Style
    
    Overrides [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[constructor](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#constructor)
    

## Properties[](#properties-1)

### crossTileSymbolIndex[](#crosstilesymbolindex)

crossTileSymbolIndex: [CrossTileSymbolIndex](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.CrossTileSymbolIndex/)

Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[crossTileSymbolIndex](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#crosstilesymbolindex)

### dispatcher[](#dispatcher)

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

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

### glyphManager[](#glyphmanager)

glyphManager: [GlyphManager](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.GlyphManager/)

Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[glyphManager](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#glyphmanager)

### imageManager[](#imagemanager)

imageManager: [ImageManager](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.ImageManager/)

Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[imageManager](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#imagemanager)

### light[](#light)

light: [Light](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Light/)

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

### lineAtlas[](#lineatlas)

lineAtlas: [LineAtlas](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.LineAtlas/)

Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[lineAtlas](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#lineatlas)

### map[](#map)

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

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

### pauseablePlacement[](#pauseableplacement)

pauseablePlacement: [PauseablePlacement](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.PauseablePlacement/)

Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[pauseablePlacement](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#pauseableplacement)

### placement[](#placement)

placement: [Placement](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Placement/)

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

### projection[](#projection)

projection: [Projection](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Projection/) | undefined

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

### sky[](#sky)

sky: [Sky](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Sky/)

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

### stylesheet[](#stylesheet)

stylesheet: [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/)

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

### tileManagers[](#tilemanagers)

tileManagers: { \[\_: string\]: [TileManager](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.TileManager/) }

Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[tileManagers](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#tilemanagers)

### z[](#z)

z: number

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

### zoomHistory[](#zoomhistory)

zoomHistory: [ZoomHistory](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.ZoomHistory/)

Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[zoomHistory](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#zoomhistory)

## Methods[](#methods-1)

### addImage[](#addimage)

-   addImage(id: string, image: [StyleImage](https://docs.maptiler.com/sdk-js/api-reference/types/StyleImage/)): this[](#addimage-1)
    
    #### Parameters
    
    -   id: string
    -   image: [StyleImage](https://docs.maptiler.com/sdk-js/api-reference/types/StyleImage/)
    
    #### Returns this
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[addImage](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#addimage)
    

### addLayer[](#addlayer)

-   addLayer(  
        layerObject: [AddLayerObject](https://docs.maptiler.com/sdk-js/api-reference/types/AddLayerObject/),  
        before?: string,  
        options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
    ): this[](#addlayer-1)
    
    Add a layer to the map style. The layer will be inserted before the layer with ID `before`, or appended if `before` is omitted.
    
    #### Parameters
    
    -   layerObject: [AddLayerObject](https://docs.maptiler.com/sdk-js/api-reference/types/AddLayerObject/)
        
        The style layer to add.
        
    -   `Optional`before: string
        
        ID of an existing layer to insert before
        
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
        
        Style setter options.
        
    
    #### Returns this
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[addLayer](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#addlayer)
    

### addSource[](#addsource)

-   addSource(  
        id: string,  
        source: [CanvasSourceSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/CanvasSourceSpecification/) | [SourceSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SourceSpecification/),  
        options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
    ): void[](#addsource-1)
    
    #### Parameters
    
    -   id: string
    -   source: [CanvasSourceSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/CanvasSourceSpecification/) | [SourceSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SourceSpecification/)
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[addSource](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#addsource)
    

### addSprite[](#addsprite)

-   addSprite(  
        id: string,  
        url: string,  
        options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
        completion?: (err: Error) \=> void,  
    ): void[](#addsprite-1)
    
    Add a sprite.
    
    #### Parameters
    
    -   id: string
        
        The id of the desired sprite
        
    -   url: string
        
        The url to load the desired sprite from
        
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
        
        The style setter options
        
    -   `Optional`completion: (err: Error) \=> void
        
        The completion handler
        
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[addSprite](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#addsprite)
    

### destroy[](#destroy)

-   destroy(): void[](#destroy-1)
    
    Destroys all internal resources of the style (sources, images, layers, etc.)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[destroy](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#destroy)
    

### fire[](#fire)

-   fire(event: string | [Event](https://docs.maptiler.com/sdk-js/api-reference/classes/Event/), properties?: any): this[](#fire-1)
    
    #### Parameters
    
    -   event: string | [Event](https://docs.maptiler.com/sdk-js/api-reference/classes/Event/)
    -   `Optional`properties: any
    
    #### Returns this
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[fire](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#fire)
    

### getDashes[](#getdashes)

-   getDashes(  
        mapId: string | number,  
        params: [GetDashesParameters](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetDashesParameters/),  
    ): Promise<[GetDashesResponse](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetDashesResponse/)\>[](#getdashes-1)
    
    #### Parameters
    
    -   mapId: string | number
    -   params: [GetDashesParameters](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetDashesParameters/)
    
    #### Returns Promise<[GetDashesResponse](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetDashesResponse/)\>
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getDashes](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getdashes)
    

### getFeatureState[](#getfeaturestate)

-   getFeatureState(target: [FeatureIdentifier](https://docs.maptiler.com/sdk-js/api-reference/types/FeatureIdentifier/)): [FeatureState](https://docs.maptiler.com/sdk-js/api-reference/types/FeatureState/)[](#getfeaturestate-1)
    
    #### Parameters
    
    -   target: [FeatureIdentifier](https://docs.maptiler.com/sdk-js/api-reference/types/FeatureIdentifier/)
    
    #### Returns [FeatureState](https://docs.maptiler.com/sdk-js/api-reference/types/FeatureState/)
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getFeatureState](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getfeaturestate)
    

### getFilter[](#getfilter)

-   getFilter(layer: string): void | [FilterSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/FilterSpecification/)[](#getfilter-1)
    
    Get a layer's filter object
    
    #### Parameters
    
    -   layer: string
        
        the layer to inspect
        
    
    #### Returns void | [FilterSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/FilterSpecification/)
    
    the layer's filter, if any
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getFilter](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getfilter)
    

### getGlobalState[](#getglobalstate)

-   getGlobalState(): [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, any\>[](#getglobalstate-1)
    
    #### Returns [Record](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Record/)<string, any\>
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getGlobalState](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getglobalstate)
    

### getGlyphs[](#getglyphs)

-   getGlyphs(  
        mapId: string | number,  
        params: [GetGlyphsParameters](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetGlyphsParameters/),  
    ): Promise<[GetGlyphsResponse](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetGlyphsResponse/)\>[](#getglyphs-1)
    
    #### Parameters
    
    -   mapId: string | number
    -   params: [GetGlyphsParameters](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetGlyphsParameters/)
    
    #### Returns Promise<[GetGlyphsResponse](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetGlyphsResponse/)\>
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getGlyphs](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getglyphs)
    

### getGlyphsUrl[](#getglyphsurl)

-   getGlyphsUrl(): string | null[](#getglyphsurl-1)
    
    #### Returns string | null
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getGlyphsUrl](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getglyphsurl)
    

### getImage[](#getimage)

-   getImage(id: string): [StyleImage](https://docs.maptiler.com/sdk-js/api-reference/types/StyleImage/)[](#getimage-1)
    
    #### Parameters
    
    -   id: string
    
    #### Returns [StyleImage](https://docs.maptiler.com/sdk-js/api-reference/types/StyleImage/)
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getImage](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getimage)
    

### getImages[](#getimages)

-   getImages(  
        mapId: string | number,  
        params: [GetImagesParameters](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetImagesParameters/),  
    ): Promise<[GetImagesResponse](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetImagesResponse/)\>[](#getimages-1)
    
    #### Parameters
    
    -   mapId: string | number
    -   params: [GetImagesParameters](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetImagesParameters/)
    
    #### Returns Promise<[GetImagesResponse](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GetImagesResponse/)\>
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getImages](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getimages)
    

### getLayer[](#getlayer)

-   getLayer(id: string): [StyleLayer](https://docs.maptiler.com/sdk-js/api-reference/classes/StyleLayer/) | undefined[](#getlayer-1)
    
    Return the style layer object with the given `id`.
    
    #### Parameters
    
    -   id: string
        
        id of the desired layer
        
    
    #### Returns [StyleLayer](https://docs.maptiler.com/sdk-js/api-reference/classes/StyleLayer/) | undefined
    
    a layer, if one with the given `id` exists
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getLayer](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getlayer)
    

### getLayersOrder[](#getlayersorder)

-   getLayersOrder(): string\[\][](#getlayersorder-1)
    
    Return the ids of all layers currently in the style, including custom layers, in order.
    
    #### Returns string\[\]
    
    ids of layers, in order
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getLayersOrder](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getlayersorder)
    

### getLayoutProperty[](#getlayoutproperty)

-   getLayoutProperty(layerId: string, name: string): any[](#getlayoutproperty-1)
    
    Get a layout property's value from a given layer
    
    #### Parameters
    
    -   layerId: string
        
        the layer to inspect
        
    -   name: string
        
        the name of the layout property
        
    
    #### Returns any
    
    the property value
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getLayoutProperty](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getlayoutproperty)
    

### getLight[](#getlight)

-   getLight(): [LightSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/LightSpecification/)[](#getlight-1)
    
    #### Returns [LightSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/LightSpecification/)
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getLight](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getlight)
    

### getPaintProperty[](#getpaintproperty)

-   getPaintProperty(layer: string, name: string): unknown[](#getpaintproperty-1)
    
    #### Parameters
    
    -   layer: string
    -   name: string
    
    #### Returns unknown
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getPaintProperty](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getpaintproperty)
    

### getProjection[](#getprojection)

-   getProjection(): [ProjectionSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/ProjectionSpecification/)[](#getprojection-1)
    
    #### Returns [ProjectionSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/ProjectionSpecification/)
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getProjection](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getprojection)
    

### getSky[](#getsky)

-   getSky(): [SkySpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SkySpecification/)[](#getsky-1)
    
    #### Returns [SkySpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SkySpecification/)
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getSky](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getsky)
    

### getSource[](#getsource)

-   getSource(id: string): [Source](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Source/) | undefined[](#getsource-1)
    
    Get a source by ID.
    
    #### Parameters
    
    -   id: string
        
        ID of the desired source
        
    
    #### Returns [Source](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Source/) | undefined
    
    source
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getSource](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getsource)
    

### getSprite[](#getsprite)

-   getSprite(): { id: string; url: string }\[\][](#getsprite-1)
    
    Get the current sprite value.
    
    #### Returns { id: string; url: string }\[\]
    
    empty array when no sprite is set; id-url pairs otherwise
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getSprite](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#getsprite)
    

### getTransition[](#gettransition)

-   getTransition(): { delay: number; duration: number } & [TransitionSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/TransitionSpecification/)[](#gettransition-1)
    
    #### Returns { delay: number; duration: number } & [TransitionSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/TransitionSpecification/)
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[getTransition](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#gettransition)
    

### hasLayer[](#haslayer)

-   hasLayer(id: string): boolean[](#haslayer-1)
    
    Checks if a specific layer is present within the style.
    
    #### Parameters
    
    -   id: string
        
        the id of the desired layer
        
    
    #### Returns boolean
    
    a boolean specifying if the given layer is present
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[hasLayer](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#haslayer)
    

### hasTransitions[](#hastransitions)

-   hasTransitions(): boolean[](#hastransitions-1)
    
    #### Returns boolean
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[hasTransitions](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#hastransitions)
    

### listens[](#listens)

-   listens(type: string): boolean[](#listens-1)
    
    Returns a true if this instance of Evented or any forwardeed instances of Evented have a listener for the specified type.
    
    #### Parameters
    
    -   type: string
        
        The event type
        
    
    #### Returns boolean
    
    `true` if there is at least one registered listener for specified event type, `false` otherwise
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[listens](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#listens)
    

### listImages[](#listimages)

-   listImages(): string\[\][](#listimages-1)
    
    #### Returns string\[\]
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[listImages](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#listimages)
    

### loaded[](#loaded)

-   loaded(): boolean[](#loaded-1)
    
    #### Returns boolean
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[loaded](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#loaded)
    

### loadEmpty[](#loadempty)

-   loadEmpty(): void[](#loadempty-1)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[loadEmpty](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#loadempty)
    

### loadJSON[](#loadjson)

-   loadJSON(  
        json: [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/),  
        options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/) & [StyleSwapOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSwapOptions/),  
        previousStyle?: [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/),  
    ): void[](#loadjson-1)
    
    #### Parameters
    
    -   json: [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/)
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/) & [StyleSwapOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSwapOptions/)
    -   `Optional`previousStyle: [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[loadJSON](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#loadjson)
    

### loadURL[](#loadurl)

-   loadURL(  
        url: string,  
        options?: [StyleSwapOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSwapOptions/) & [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
        previousStyle?: [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/),  
    ): Promise<void\>[](#loadurl-1)
    
    #### Parameters
    
    -   url: string
    -   `Optional`options: [StyleSwapOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSwapOptions/) & [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
    -   `Optional`previousStyle: [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/)
    
    #### Returns Promise<void\>
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[loadURL](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#loadurl)
    

### moveLayer[](#movelayer)

-   moveLayer(id: string, before?: string): void[](#movelayer-1)
    
    Moves a layer to a different z-position. The layer will be inserted before the layer with ID `before`, or appended if `before` is omitted.
    
    #### Parameters
    
    -   id: string
        
        ID of the layer to move
        
    -   `Optional`before: string
        
        ID of an existing layer to insert before
        
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[moveLayer](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#movelayer)
    

### off[](#off)

-   off(type: string, listener: [Listener](https://docs.maptiler.com/sdk-js/api-reference/types/Listener/)): this[](#off-1)
    
    Removes a previously registered event listener.
    
    #### Parameters
    
    -   type: string
        
        The event type to remove listeners for.
        
    -   listener: [Listener](https://docs.maptiler.com/sdk-js/api-reference/types/Listener/)
        
        The listener function to remove.
        
    
    #### Returns this
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[off](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#off)
    

### on[](#on)

-   on(type: string, listener: [Listener](https://docs.maptiler.com/sdk-js/api-reference/types/Listener/)): [Subscription](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Subscription/)[](#on-1)
    
    Adds a listener to a specified event type.
    
    #### Parameters
    
    -   type: string
        
        The event type to add a listen for.
        
    -   listener: [Listener](https://docs.maptiler.com/sdk-js/api-reference/types/Listener/)
        
        The function to be called when the event is fired. The listener function is called with the data object passed to `fire`, extended with `target` and `type` properties.
        
    
    #### Returns [Subscription](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Subscription/)
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[on](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#on)
    

### once[](#once)

-   once(type: string, listener?: [Listener](https://docs.maptiler.com/sdk-js/api-reference/types/Listener/)): Promise<any\> | Style[](#once-1)
    
    Adds a listener that will be called only once to a specified event type.
    
    The listener will be called first time the event fires after the listener is registered.
    
    #### Parameters
    
    -   type: string
        
        The event type to listen for.
        
    -   `Optional`listener: [Listener](https://docs.maptiler.com/sdk-js/api-reference/types/Listener/)
        
        The function to be called when the event is fired the first time.
        
    
    #### Returns Promise<any\> | Style
    
    `this` or a promise if a listener is not provided
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[once](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#once)
    

### queryRenderedFeatures[](#queryrenderedfeatures)

-   queryRenderedFeatures(  
        queryGeometry: [Point](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Point/)\[\],  
        params: [QueryRenderedFeaturesOptions](https://docs.maptiler.com/sdk-js/api-reference/types/QueryRenderedFeaturesOptions/),  
        transform: [IReadonlyTransform](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.IReadonlyTransform/),  
    ): [MapGeoJSONFeature](https://docs.maptiler.com/sdk-js/api-reference/types/MapGeoJSONFeature/)\[\][](#queryrenderedfeatures-1)
    
    #### Parameters
    
    -   queryGeometry: [Point](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Point/)\[\]
    -   params: [QueryRenderedFeaturesOptions](https://docs.maptiler.com/sdk-js/api-reference/types/QueryRenderedFeaturesOptions/)
    -   transform: [IReadonlyTransform](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.IReadonlyTransform/)
    
    #### Returns [MapGeoJSONFeature](https://docs.maptiler.com/sdk-js/api-reference/types/MapGeoJSONFeature/)\[\]
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[queryRenderedFeatures](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#queryrenderedfeatures)
    

### querySourceFeatures[](#querysourcefeatures)

-   querySourceFeatures(  
        sourceID: string,  
        params?: [QuerySourceFeatureOptions](https://docs.maptiler.com/sdk-js/api-reference/types/QuerySourceFeatureOptions/),  
    ): [GeoJSONFeature](https://docs.maptiler.com/sdk-js/api-reference/classes/GeoJSONFeature/)\[\][](#querysourcefeatures-1)
    
    #### Parameters
    
    -   sourceID: string
    -   `Optional`params: [QuerySourceFeatureOptions](https://docs.maptiler.com/sdk-js/api-reference/types/QuerySourceFeatureOptions/)
    
    #### Returns [GeoJSONFeature](https://docs.maptiler.com/sdk-js/api-reference/classes/GeoJSONFeature/)\[\]
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[querySourceFeatures](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#querysourcefeatures)
    

### removeFeatureState[](#removefeaturestate)

-   removeFeatureState(target: [FeatureIdentifier](https://docs.maptiler.com/sdk-js/api-reference/types/FeatureIdentifier/), key?: string): void[](#removefeaturestate-1)
    
    #### Parameters
    
    -   target: [FeatureIdentifier](https://docs.maptiler.com/sdk-js/api-reference/types/FeatureIdentifier/)
    -   `Optional`key: string
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[removeFeatureState](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#removefeaturestate)
    

### removeImage[](#removeimage)

-   removeImage(id: string): this[](#removeimage-1)
    
    #### Parameters
    
    -   id: string
    
    #### Returns this
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[removeImage](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#removeimage)
    

### removeLayer[](#removelayer)

-   removeLayer(id: string): void[](#removelayer-1)
    
    Remove the layer with the given id from the style. A [ErrorEvent](https://docs.maptiler.com/sdk-js/api-reference/classes/ErrorEvent/) event will be fired if no such layer exists.
    
    #### Parameters
    
    -   id: string
        
        id of the layer to remove
        
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[removeLayer](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#removelayer)
    

### removeSource[](#removesource)

-   removeSource(id: string): this[](#removesource-1)
    
    Remove a source from this stylesheet, given its id.
    
    #### Parameters
    
    -   id: string
        
        id of the source to remove
        
    
    #### Returns this
    
    #### Throws[](#throws)
    
    if no source is found with the given ID
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[removeSource](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#removesource)
    

### removeSprite[](#removesprite)

-   removeSprite(id: string): void[](#removesprite-1)
    
    Remove a sprite by its id. When the last sprite is removed, the whole `this.stylesheet.sprite` object becomes `undefined`. This falsy `undefined` value later prevents attempts to load the sprite when it's absent.
    
    #### Parameters
    
    -   id: string
        
        the id of the sprite to remove
        
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[removeSprite](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#removesprite)
    

### serialize[](#serialize)

-   serialize(): [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/) | undefined[](#serialize-1)
    
    #### Returns [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/) | undefined
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[serialize](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#serialize)
    

### setEventedParent[](#seteventedparent)

-   setEventedParent(parent?: [Evented](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Evented/) | null, data?: any): this[](#seteventedparent-1)
    
    Bubble all events fired by this instance of Evented to this parent instance of Evented.
    
    #### Parameters
    
    -   `Optional`parent: [Evented](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Evented/) | null
    -   `Optional`data: any
    
    #### Returns this
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setEventedParent](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#seteventedparent)
    

### setFeatureState[](#setfeaturestate)

-   setFeatureState(target: [FeatureIdentifier](https://docs.maptiler.com/sdk-js/api-reference/types/FeatureIdentifier/), state: any): void[](#setfeaturestate-1)
    
    #### Parameters
    
    -   target: [FeatureIdentifier](https://docs.maptiler.com/sdk-js/api-reference/types/FeatureIdentifier/)
    -   state: any
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setFeatureState](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setfeaturestate)
    

### setFilter[](#setfilter)

-   setFilter(  
        layerId: string,  
        filter?: [FilterSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/FilterSpecification/) | null,  
        options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
    ): void[](#setfilter-1)
    
    #### Parameters
    
    -   layerId: string
    -   `Optional`filter: [FilterSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/FilterSpecification/) | null
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setFilter](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setfilter)
    

### setGeoJSONSourceData[](#setgeojsonsourcedata)

-   setGeoJSONSourceData(  
        id: string,  
        data: string | [GeoJSON](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GeoJSON/)<[Geometry](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Geometry/), [GeoJsonProperties](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GeoJsonProperties/)\>,  
    ): void[](#setgeojsonsourcedata-1)
    
    Set the data of a GeoJSON source, given its id.
    
    #### Parameters
    
    -   id: string
        
        id of the source
        
    -   data: string | [GeoJSON](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GeoJSON/)<[Geometry](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.Geometry/), [GeoJsonProperties](https://docs.maptiler.com/sdk-js/api-reference/types/Externals.GeoJsonProperties/)\>
        
        GeoJSON source
        
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setGeoJSONSourceData](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setgeojsonsourcedata)
    

### setGlobalState[](#setglobalstate)

-   setGlobalState(newStylesheetState: [StateSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StateSpecification/)): void[](#setglobalstate-1)
    
    #### Parameters
    
    -   newStylesheetState: [StateSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StateSpecification/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setGlobalState](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setglobalstate)
    

### setGlobalStateProperty[](#setglobalstateproperty)

-   setGlobalStateProperty(name: string, value: any): this[](#setglobalstateproperty-1)
    
    #### Parameters
    
    -   name: string
    -   value: any
    
    #### Returns this
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setGlobalStateProperty](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setglobalstateproperty)
    

### setGlyphs[](#setglyphs)

-   setGlyphs(  
        glyphsUrl: string | null | undefined,  
        options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
    ): void[](#setglyphs-1)
    
    #### Parameters
    
    -   glyphsUrl: string | null | undefined
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setGlyphs](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setglyphs)
    

### setLayerZoomRange[](#setlayerzoomrange)

-   setLayerZoomRange(  
        layerId: string,  
        minzoom?: number | null,  
        maxzoom?: number | null,  
    ): void[](#setlayerzoomrange-1)
    
    #### Parameters
    
    -   layerId: string
    -   `Optional`minzoom: number | null
    -   `Optional`maxzoom: number | null
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setLayerZoomRange](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setlayerzoomrange)
    

### setLayoutProperty[](#setlayoutproperty)

-   setLayoutProperty(  
        layerId: string,  
        name: string,  
        value: any,  
        options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
    ): void[](#setlayoutproperty-1)
    
    #### Parameters
    
    -   layerId: string
    -   name: string
    -   value: any
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setLayoutProperty](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setlayoutproperty)
    

### setLight[](#setlight)

-   setLight(lightOptions: [LightSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/LightSpecification/), options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)): void[](#setlight-1)
    
    #### Parameters
    
    -   lightOptions: [LightSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/LightSpecification/)
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setLight](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setlight)
    

### setPaintProperty[](#setpaintproperty)

-   setPaintProperty(  
        layerId: string,  
        name: string,  
        value: any,  
        options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
    ): void[](#setpaintproperty-1)
    
    #### Parameters
    
    -   layerId: string
    -   name: string
    -   value: any
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setPaintProperty](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setpaintproperty)
    

### setProjection[](#setprojection)

-   setProjection(projection?: [ProjectionSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/ProjectionSpecification/)): void[](#setprojection-1)
    
    #### Parameters
    
    -   `Optional`projection: [ProjectionSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/ProjectionSpecification/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setProjection](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setprojection)
    

### setSky[](#setsky)

-   setSky(skyOptions?: [SkySpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SkySpecification/), options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)): void[](#setsky-1)
    
    #### Parameters
    
    -   `Optional`skyOptions: [SkySpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SkySpecification/)
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setSky](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setsky)
    

### setSprite[](#setsprite)

-   setSprite(  
        sprite: [SpriteSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SpriteSpecification/),  
        options?: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
        completion?: (err: Error) \=> void,  
    ): void[](#setsprite-1)
    
    Set a new value for the style's sprite.
    
    #### Parameters
    
    -   sprite: [SpriteSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/SpriteSpecification/)
        
        new sprite value
        
    -   `Optional`options: [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
        
        style setter options
        
    -   `Optional`completion: (err: Error) \=> void
        
        the completion handler
        
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setSprite](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setsprite)
    

### setState[](#setstate)

-   setState(  
        nextState: [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/),  
        options?: [StyleSwapOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSwapOptions/) & [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/),  
    ): boolean[](#setstate-1)
    
    Update this style's state to match the given style JSON, performing only the necessary mutations.
    
    May throw an Error ('Unimplemented: METHOD') if the mapbox-gl-style-spec diff algorithm produces an operation that is not supported.
    
    #### Parameters
    
    -   nextState: [StyleSpecification](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSpecification/)
    -   `Optional`options: [StyleSwapOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSwapOptions/) & [StyleSetterOptions](https://docs.maptiler.com/sdk-js/api-reference/types/StyleSetterOptions/)
    
    #### Returns boolean
    
    true if any changes were made; false otherwise
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[setState](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#setstate)
    

### update[](#update)

-   update(parameters: [EvaluationParameters](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.EvaluationParameters/)): void[](#update-1)
    
    #### Parameters
    
    -   parameters: [EvaluationParameters](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.EvaluationParameters/)
    
    #### Returns void
    
    #### Internal[](#internal)
    
    Apply queued style updates in a batch and recalculate zoom-dependent paint properties.
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[update](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#update)
    

### updateImage[](#updateimage)

-   updateImage(id: string, image: [StyleImage](https://docs.maptiler.com/sdk-js/api-reference/types/StyleImage/)): void[](#updateimage-1)
    
    #### Parameters
    
    -   id: string
    -   image: [StyleImage](https://docs.maptiler.com/sdk-js/api-reference/types/StyleImage/)
    
    #### Returns void
    
    Inherited from [Style](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/).[updateImage](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Style/#updateimage)
