Browse Source

Windy view 콘솔 에러 수정

pull/2/head
이학준 2 years ago
parent
commit
00ef030c2c
  1. 31
      src/views/weather/WeatherView.js

31
src/views/weather/WeatherView.js

@ -1,36 +1,21 @@
import {WINDY_KEY} from '../../configs/constants' import { WINDY_KEY } from '../../configs/constants';
export const WeatherView = () => { export const WeatherView = () => {
const options = { const options = {
// Required: API key // Required: API key
key:WINDY_KEY, // REPLACE WITH YOUR KEY !!! key: WINDY_KEY // REPLACE WITH YOUR KEY !!!
// Put additional console output // Put additional console output
// Optional: Initial state of the map // 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 ( 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; export default WeatherView;

Loading…
Cancel
Save