이학준
2 years ago
1 changed files with 16 additions and 31 deletions
@ -1,36 +1,21 @@
|
||||
import {WINDY_KEY} from '../../configs/constants' |
||||
import { WINDY_KEY } from '../../configs/constants'; |
||||
export const WeatherView = () => { |
||||
const options = { |
||||
// Required: API key
|
||||
key:WINDY_KEY, // REPLACE WITH YOUR KEY !!!
|
||||
key: WINDY_KEY // REPLACE WITH YOUR KEY !!!
|
||||
|
||||
// Put additional console output
|
||||
|
||||
// Optional: Initial state of the map
|
||||
lat: 37.12, |
||||
lon: 130.11, |
||||
zoom: 7, |
||||
}; |
||||
|
||||
//Initialize Windy API
|
||||
windyInit(options, windyAPI => { |
||||
// windyAPI is ready, and contain 'map', 'store',
|
||||
// 'picker' and other usefull stuff
|
||||
// const { map } = windyAPI;
|
||||
// .map is instance of Leaflet map
|
||||
|
||||
// L.popup()
|
||||
// .setLatLng([37.12, 130.11])
|
||||
// .setContent('Hello World')
|
||||
// .openOn(map);
|
||||
|
||||
}); |
||||
|
||||
|
||||
return ( |
||||
<> |
||||
<iframe style={{ width: '100%', height: '99vh' }} src="https://embed.windy.com/embed2.html?lat=37.549&lon=126.658&detailLat=37.549&detailLon=126.658&zoom=5&level=surface&overlay=wind&product=ecmwf&menu=&message=&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=&metricWind=default&metricTemp=default&radarRange=-1" frameborder="0"></iframe> |
||||
<iframe |
||||
style={{ width: '100%', height: '99vh' }} |
||||
src='https://embed.windy.com/embed2.html?lat=37.549&lon=126.658&detailLat=37.549&detailLon=126.658&zoom=7&level=surface&overlay=wind&product=ecmwf&menu=&message=&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=&metricWind=default&metricTemp=default&radarRange=-1' |
||||
></iframe> |
||||
</> |
||||
) |
||||
} |
||||
); |
||||
}; |
||||
export default WeatherView; |
||||
|
Loading…
Reference in new issue