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

##### Index

### Constructors[](#constructors)

[constructor](#constructor)

### Properties[](#properties)

[bytes](#bytes) [dashEntry](#dashentry) [data](#data) [dirty](#dirty) [height](#height) [nextRow](#nextrow) [texture](#texture) [width](#width)

### Methods[](#methods)

[addDash](#adddash) [addRegularDash](#addregulardash) [addRoundDash](#addrounddash) [bind](#bind) [getDash](#getdash) [getDashRanges](#getdashranges)

## Constructors[](#constructors-1)

### constructor[](#constructor)

-   new LineAtlas(width: number, height: number): LineAtlas[](#constructorlineatlas)
    
    #### Parameters
    
    -   width: number
    -   height: number
    
    #### Returns LineAtlas
    

## Properties[](#properties-1)

### bytes[](#bytes)

bytes: number

### dashEntry[](#dashentry)

dashEntry: { \[\_: string\]: [DashEntry](https://docs.maptiler.com/sdk-js/api-reference/types/DashEntry/) }

### data[](#data)

data: Uint8Array

### dirty[](#dirty)

dirty: boolean

### height[](#height)

height: number

### nextRow[](#nextrow)

nextRow: number

### texture[](#texture)

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

### width[](#width)

width: number

## Methods[](#methods-1)

### addDash[](#adddash)

-   addDash(dasharray: number\[\], round: boolean): [DashEntry](https://docs.maptiler.com/sdk-js/api-reference/types/DashEntry/)[](#adddash-1)
    
    #### Parameters
    
    -   dasharray: number\[\]
    -   round: boolean
    
    #### Returns [DashEntry](https://docs.maptiler.com/sdk-js/api-reference/types/DashEntry/)
    

### addRegularDash[](#addregulardash)

-   addRegularDash(ranges: any): void[](#addregulardash-1)
    
    #### Parameters
    
    -   ranges: any
    
    #### Returns void
    

### addRoundDash[](#addrounddash)

-   addRoundDash(ranges: any, stretch: number, n: number): void[](#addrounddash-1)
    
    #### Parameters
    
    -   ranges: any
    -   stretch: number
    -   n: number
    
    #### Returns void
    

### bind[](#bind)

-   bind(context: [Context](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Context/)): void[](#bind-1)
    
    #### Parameters
    
    -   context: [Context](https://docs.maptiler.com/sdk-js/api-reference/classes/Externals.Context/)
    
    #### Returns void
    

### getDash[](#getdash)

-   getDash(dasharray: number\[\], round: boolean): [DashEntry](https://docs.maptiler.com/sdk-js/api-reference/types/DashEntry/)[](#getdash-1)
    
    Get or create a dash line pattern.
    
    #### Parameters
    
    -   dasharray: number\[\]
        
        the key (represented by numbers) to get the dash texture
        
    -   round: boolean
        
        whether to add circle caps in between dash segments
        
    
    #### Returns [DashEntry](https://docs.maptiler.com/sdk-js/api-reference/types/DashEntry/)
    
    position of dash texture in [DashEntry](https://docs.maptiler.com/sdk-js/api-reference/types/DashEntry/)
    

### getDashRanges[](#getdashranges)

-   getDashRanges(  
        dasharray: number\[\],  
        lineAtlasWidth: number,  
        stretch: number,  
    ): any\[\][](#getdashranges-1)
    
    #### Parameters
    
    -   dasharray: number\[\]
    -   lineAtlasWidth: number
    -   stretch: number
    
    #### Returns any\[\]
