setSnowfallCondition は一度に一条件のみ有効です。再設定すると上書きされます。clearSnowfallCondition で表示を完全に無効化できます。import * as GIA from '@ntj/gaia';
const date = (document.querySelector('[name="map-snowfall-date"]') as HTMLInputElement).value;
const time = (document.querySelector('[name="map-snowfall-time"]') as HTMLInputElement).value;
const offset = (document.querySelector('[name="map-snowfall-offset"]') as HTMLInputElement).value;
const snowfallTime = date && time ? new Date(`${date}T${time}:00`) : new Date();
map.setSnowfallCondition(new GIA.value.SnowfallCondition({
offset: parseInt(offset, 10),
time: snowfallTime,
}));
// 非表示
map.clearSnowfallCondition();
積雪深情報の表示条件を設定する — 詳細な使用例
積雪深のデータを地図上にメッシュ表示します。
SnowfallConditionはoffset(対象分)とtime(対象日時)を指定できます。