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

# Interface StylePropertyMap

The **`StylePropertyMap`** interface of the CSS Typed Object Model API provides a representation of a CSS declaration block that is an alternative to CSSStyleDeclaration.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMap)

interface StylePropertyMap {  
    [size](#size): number;  
    ["\[iterator\]"](#iterator-1)(): [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<  
        \[string, [Iterable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Iterable/)<[CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/), any, any\>\],  
    \>;  
    [append](#append-1)(property: string, ...values: (string | [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/))\[\]): void;  
    [clear](#clear-1)(): void;  
    [delete](#delete-1)(property: string): void;  
    [entries](#entries-1)(): [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<  
        \[string, [Iterable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Iterable/)<[CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/), any, any\>\],  
    \>;  
    [forEach](#foreach-1)(  
        callbackfn: (  
            value: [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/)\[\],  
            key: string,  
            parent: [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/),  
        ) \=> void,  
        thisArg?: any,  
    ): void;  
    [get](#get-1)(property: string): [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/) | undefined;  
    [getAll](#getall-1)(property: string): [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/)\[\];  
    [has](#has-1)(property: string): boolean;  
    [keys](#keys-1)(): [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<string\>;  
    [set](#set-1)(property: string, ...values: (string | [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/))\[\]): void;  
    [values](#values-1)(): [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<  
        [Iterable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Iterable/)<[CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/), any, any\>,  
    \>;  
}

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

-   [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/)
    -   StylePropertyMap

##### Index

### Properties[](#properties)

[size](#size)

### Methods[](#methods)

[\[iterator\]](#iterator) [append](#append) [clear](#clear) [delete](#delete) [entries](#entries) [forEach](#foreach) [get](#get) [getAll](#getall) [has](#has) [keys](#keys) [set](#set) [values](#values)

## Properties[](#properties-1)

### `Readonly`size[](#size)

size: number

The **`size`** read-only property of the StylePropertyMapReadOnly interface returns an unsigned long integer containing the size of the StylePropertyMapReadOnly object.

[MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/size)

Inherited from [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/).[size](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/#size)

## Methods[](#methods-1)

### \[iterator\][](#iterator)

-   "\[iterator\]"(): [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<  
        \[string, [Iterable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Iterable/)<[CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/), any, any\>\],  
    \>[](#iterator-1)
    
    #### Returns [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<\[string, [Iterable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Iterable/)<[CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/), any, any\>\]\>
    
    Inherited from [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/).[\[iterator\]](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/#iterator)
    

### append[](#append)

-   append(property: string, ...values: (string | [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/))\[\]): void[](#append-1)
    
    The **`append()`** method of the StylePropertyMap interface adds the passed CSS value to the StylePropertyMap with the given property.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/append)
    
    #### Parameters
    
    -   property: string
    -   ...values: (string | [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/))\[\]
    
    #### Returns void
    

### clear[](#clear)

-   clear(): void[](#clear-1)
    
    The **`clear()`** method of the StylePropertyMap interface removes all declarations in the StylePropertyMap.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/clear)
    
    #### Returns void
    

### delete[](#delete)

-   delete(property: string): void[](#delete-1)
    
    The **`delete()`** method of the StylePropertyMap interface removes the CSS declaration with the given property.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/delete)
    
    #### Parameters
    
    -   property: string
    
    #### Returns void
    

### entries[](#entries)

-   entries(): [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<  
        \[string, [Iterable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Iterable/)<[CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/), any, any\>\],  
    \>[](#entries-1)
    
    #### Returns [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<\[string, [Iterable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Iterable/)<[CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/), any, any\>\]\>
    
    Inherited from [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/).[entries](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/#entries)
    

### forEach[](#foreach)

-   forEach(  
        callbackfn: (  
            value: [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/)\[\],  
            key: string,  
            parent: [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/),  
        ) \=> void,  
        thisArg?: any,  
    ): void[](#foreach-1)
    
    #### Parameters
    
    -   callbackfn: (value: [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/)\[\], key: string, parent: [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/)) \=> void
    -   `Optional`thisArg: any
    
    #### Returns void
    
    Inherited from [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/).[forEach](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/#foreach)
    

### get[](#get)

-   get(property: string): [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/) | undefined[](#get-1)
    
    The **`get()`** method of the StylePropertyMapReadOnly interface returns a CSSStyleValue object for the first value of the specified property.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/get)
    
    #### Parameters
    
    -   property: string
    
    #### Returns [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/) | undefined
    
    Inherited from [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/).[get](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/#get)
    

### getAll[](#getall)

-   getAll(property: string): [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/)\[\][](#getall-1)
    
    The **`getAll()`** method of the StylePropertyMapReadOnly interface returns an array of CSSStyleValue objects containing the values for the provided property.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/getAll)
    
    #### Parameters
    
    -   property: string
    
    #### Returns [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/)\[\]
    
    Inherited from [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/).[getAll](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/#getall)
    

### has[](#has)

-   has(property: string): boolean[](#has-1)
    
    The **`has()`** method of the StylePropertyMapReadOnly interface indicates whether the specified property is in the StylePropertyMapReadOnly object.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMapReadOnly/has)
    
    #### Parameters
    
    -   property: string
    
    #### Returns boolean
    
    Inherited from [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/).[has](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/#has)
    

### keys[](#keys)

-   keys(): [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<string\>[](#keys-1)
    
    #### Returns [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<string\>
    
    Inherited from [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/).[keys](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/#keys)
    

### set[](#set)

-   set(property: string, ...values: (string | [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/))\[\]): void[](#set-1)
    
    The **`set()`** method of the StylePropertyMap interface changes the CSS declaration with the given property.
    
    [MDN Reference](https://developer.mozilla.org/docs/Web/API/StylePropertyMap/set)
    
    #### Parameters
    
    -   property: string
    -   ...values: (string | [CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/))\[\]
    
    #### Returns void
    

### values[](#values)

-   values(): [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<[Iterable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Iterable/)<[CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/), any, any\>\>[](#values-1)
    
    #### Returns [StylePropertyMapReadOnlyIterator](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnlyIterator/)<[Iterable](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Iterable/)<[CSSStyleValue](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.CSSStyleValue/), any, any\>\>
    
    Inherited from [StylePropertyMapReadOnly](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/).[values](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.StylePropertyMapReadOnly/#values)
