0.0.6 • Published 2 years ago

weather_condition v0.0.6

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Weather condition

The Weather Condition Render library provides an interfance for displaying GRIB2 data on given OpenLayers map.

Публикация пакета в npm

  1. Установить зависимости:
  npm i
  1. Запустить сборку билда
  npm run build
  1. Авторизоваться в npm:
  npm login
  1. Опубликовать в npm:
  npm publish

Setup

Clone the repository, then run npm install to install the library's dependencies.

Use

Import the API function that creates WeatherRenderer instance from project's index:

import renderWeather from 'lhs-weather-conditon/index.js';

Then call it to assign the instance to a variable, with an OpenLayers map as a parameter:

const weather = renderWeather(ol_map);

API

WeatherRenderer class has methods to work with:

  • loadData(grib2_file) gets GRIB2 file and renders it's content on a map renderWeather(ol_map) set;
  • setLayer(wind|temperature|pressure|precipitation) change rendered layer to the specified (it should be 'wind', 'temperature', 'pressure' or 'precipitation').

show boolean property toggles the visibility of weather map. Set show to false to hide weather condition, or true to show it again.

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago