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