Is the solar layer included in the API in the premium version? It's not available in the free version.
![](https://ims-s.windy.com/account/images/14216354-profileavatar.png?1733821749984)
Latest posts made by Madusara Liyanage
-
Is solar layer included in the API in premium?
-
RE: Has anybody used windy api with ReactJS or NextJs. Is it possible?
Thank you so much for your response. I added a condition - if (typeof window !== 'undefined') inside the useEffect
useEffect(() => { if (typeof window !== 'undefined'){ // rest of the code } }, [])
But still getting the same error.
-
RE: Has anybody used windy api with ReactJS or NextJs. Is it possible?
Thank you so much for your response. I added a condition - if (typeof window !== 'undefined') inside the useEffect
useEffect(() => { if (typeof window !== 'undefined'){ // rest of the code } }, [])
But still getting the same error.
-
RE: Has anybody used windy api with ReactJS or NextJs. Is it possible?
@jorgef said in Has anybody used windy api with ReactJS or NextJs. Is it possible?:
Hello, I don't use NextJS but this error looks like you're trying to access browser-only symbols on the server. You need to first check if the environment is browser.
Thank you for your response.
I added a window check condition inside the useEffect. But still the same behaviour is observed.useEffect(() => { if (typeof window !== 'undefined') { // rest of the code } }, [])
When I do a change in the code (say add some styles to the div and save) the map is displayed properly for just one time. On subsequent page refreshes, the map is grey with the initial error message in the console. But in some random page refreshes, map is properly displayed.
-
RE: Has anybody used windy api with ReactJS or NextJs. Is it possible?
@jorgef said in Has anybody used windy api with ReactJS or NextJs. Is it possible?:
Hello, I don't use NextJS but this error looks like you're trying to access browser-only symbols on the server. You need to first check if the environment is browser.
Thank you for your response.
I added a window check condition inside the useEffect. But still the same behaviour is observed.useEffect(() => { if (typeof window !== 'undefined') { // rest of the code } }, [])
When I do a change in the code (say add some styles to the div and save) the map is displayed properly for just one time. On subsequent page refreshes, the map is grey with the initial error message in the console. But in some random page refreshes, map is properly displayed.
-
Has anybody used windy api with ReactJS or NextJs. Is it possible?
I created a nextjs component like this. Sometimes it works, but most of the time I see only a grey outlined map with no data and I get the error "ReferenceError: window is not defined" in the console.
result