---
title: "WeatherDataHandler | Weather SDK | JavaScript maps SDK"
description: "Documentation for Weather JS"
---

# Class WeatherDataHandler

##### Index

### Constructors

[constructor](#constructor)

### Methods

[fetchLatest](#fetchlatest) [getCloudCoverData](#getcloudcoverdata) [getDataForWeatherVariableID](#getdataforweathervariableid) [getFrozenPrecipitationData](#getfrozenprecipitationdata) [getPrecipitationData](#getprecipitationdata) [getPressureData](#getpressuredata) [getRadarData](#getradardata) [getSourcesAndTimestamps](#getsourcesandtimestamps) [getTemperatureData](#gettemperaturedata) [getWindData](#getwinddata) [hasData](#hasdata)

## Constructors

### constructor[](#constructor)

-   new WeatherDataHandler(): WeatherDataHandler[](#constructorweatherdatahandler)
    
    #### Returns WeatherDataHandler
    

## Methods

### `Static`fetchLatest[](#fetchlatest)

-   fetchLatest(apiKey: string, maptilerSessionId: string): Promise<void\>[](#fetchlatest-1)
    
    #### Parameters
    
    -   apiKey: string
    -   maptilerSessionId: string
    
    #### Returns Promise<void\>
    

### `Static`getCloudCoverData[](#getcloudcoverdata)

-   getCloudCoverData(): [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null[](#getcloudcoverdata-1)
    
    #### Returns [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null
    

### `Static`getDataForWeatherVariableID[](#getdataforweathervariableid)

-   getDataForWeatherVariableID(id: string): [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null[](#getdataforweathervariableid-1)
    
    #### Parameters
    
    -   id: string
    
    #### Returns [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null
    

### `Static`getFrozenPrecipitationData[](#getfrozenprecipitationdata)

-   getFrozenPrecipitationData(): [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null[](#getfrozenprecipitationdata-1)
    
    #### Returns [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null
    

### `Static`getPrecipitationData[](#getprecipitationdata)

-   getPrecipitationData(): [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null[](#getprecipitationdata-1)
    
    #### Returns [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null
    

### `Static`getPressureData[](#getpressuredata)

-   getPressureData(): [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null[](#getpressuredata-1)
    
    #### Returns [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null
    

### `Static`getRadarData[](#getradardata)

-   getRadarData(): [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null[](#getradardata-1)
    
    #### Returns [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null
    

### `Static`getSourcesAndTimestamps[](#getsourcesandtimestamps)

-   getSourcesAndTimestamps(  
        wv: [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/),  
        apiKey: string,  
        maptilerSessionId: string,  
    ): [SourceAndUnixTimestamp](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/SourceAndUnixTimestamp/)\[\][](#getsourcesandtimestamps-1)
    
    #### Parameters
    
    -   wv: [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/)
    -   apiKey: string
    -   maptilerSessionId: string
    
    #### Returns [SourceAndUnixTimestamp](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/SourceAndUnixTimestamp/)\[\]
    

### `Static`getTemperatureData[](#gettemperaturedata)

-   getTemperatureData(): [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null[](#gettemperaturedata-1)
    
    #### Returns [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null
    

### `Static`getWindData[](#getwinddata)

-   getWindData(): [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null[](#getwinddata-1)
    
    #### Returns [WeatherVariable](https://docs.maptiler.com/sdk-js/modules/weather/api-reference/types/WeatherVariable/) | null
    

### `Static`hasData[](#hasdata)

-   hasData(): boolean[](#hasdata-1)
    
    #### Returns boolean
