Page 1 of 1

Weather radar

Posted: Sunday 21 January 2024 15:54
by jberinga
I am trying to get a weather radar (https://www.sat24.com/nl-nl/city/5575/h ... ghtning=on) on Dashticz, but so far I am unable to.

When following the instructions on https://dashticz.readthedocs.io/en/beta ... /html.html, only the text Weerradar is showing. This is the code within the html file I am using:
Spoiler: show
<a class="radar" href="https://www.sat24.com/nl-nl/city/5575/h ... ghtning=on" >Weerradar</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src='https://www.sat24.com/nl-nl/city/5575/h ... ','radar');
</script>
What am I doing wrong? Or is there another way to get the weather radar working on Dashticz? It would, of course, be nice if only the radar was showing and not the whole site...

Re: Weather radar

Posted: Friday 26 January 2024 15:35
by Vomera
jberinga wrote: Sunday 21 January 2024 15:54 I am trying to get a weather radar (https://www.sat24.com/nl-nl/city/5575/h ... ghtning=on) on Dashticz, but so far I am unable to.

When following the instructions on https://dashticz.readthedocs.io/en/beta ... /html.html, only the text Weerradar is showing. This is the code within the html file I am using:
Spoiler: show
<a class="radar" href="https://www.sat24.com/nl-nl/city/5575/h ... ghtning=on" >Weerradar</a>
<script>
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src='https://www.sat24.com/nl-nl/city/5575/h ... ','radar');
</script>
What am I doing wrong? Or is there another way to get the weather radar working on Dashticz? It would, of course, be nice if only the radar was showing and not the whole site...
Image

I have it like this, but pretty hard to get it in dashtics. I made a html page in the dashtics folder and refer to it and in the html page i refer to the weatheradar page:

Image

Config.js

Code: Select all

  frames.weerplaza = {
  frameurl:"custom/weerplaza.html",
  height: 350,     //height of the block in pixels
  width: 12,
  scrollbars:false,
  refresh:1800
 }
weerplaza.html (i didnt change the name but i am using weer en radar now, before weerplaza)

Code: Select all

<iframe id="iframe" height='800px' width='500px' scrolling="no" style="border: 0px none; margin-top: -210px;  margin-left: -60px;" src="https://www.weerenradar.nl/weerradar/amsterdam/171698?center=50.82,5.76&zoom=8&layer=wr&period=periodCurrentHighRes" ></iframe>
In the iframe you can use the margin top and left to position to put the map centered on the frame. Play with those numbers. You can also use other website as well, al long it can load on the page.

example of weerplaza

Code: Select all

<!-- <iframe id="iframe" height='750px' width='500x' scrolling="no" style="border: 0px none; margin-top: -410px;  margin-left: -50px;" src="https://www.weerplaza.nl/regenradar/amsterdam/5575/regen-en-wolken/" ></iframe>-->

Re: Weather radar

Posted: Sunday 28 January 2024 15:02
by jberinga
Thanks Vomera!

I have it working now, but because sat24 isn't allowing iframe, I had to work around this and I used PHP for it.
So I have weerradar_load.php:
Spoiler: show
<?php
echo file_get_contents("https://www.sat24.com/nl-nl/city/5575/h ... ghtning=on");
?>
weerradar.php
Spoiler: show
<iframe id="iframe" height="1920px" width="1080px" scrolling="no" style="border: 0px none; margin-top: -550px; margin-left: -300px;" src="weerradar_load.php" ></iframe>
config.js
Spoiler: show
frames.weerradar = {
frameurl:"custom/weerradar.php",
height: 350, //height of the block in pixels
width: 12,
scrollbars:false,
refresh:1800
}

Re: Weather radar

Posted: Sunday 28 January 2024 21:15
by Vomera
jberinga wrote: Sunday 28 January 2024 15:02 Thanks Vomera!

I have it working now, but because sat24 isn't allowing iframe, I had to work around this and I used PHP for it.
So I have weerradar_load.php:
Spoiler: show
<?php
echo file_get_contents("https://www.sat24.com/nl-nl/city/5575/h ... ghtning=on");
?>
weerradar.php
Spoiler: show
<iframe id="iframe" height="1920px" width="1080px" scrolling="no" style="border: 0px none; margin-top: -550px; margin-left: -300px;" src="weerradar_load.php" ></iframe>
config.js
Spoiler: show
frames.weerradar = {
frameurl:"custom/weerradar.php",
height: 350, //height of the block in pixels
width: 12,
scrollbars:false,
refresh:1800
}
Hey! Thank you maybe I can use it as wel 😆 I will test it maybe tomorrow!