Howto: show local buienradar image

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
marmachine
Posts: 133
Joined: Saturday 26 March 2016 10:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Location: Netherlands
Contact:

Howto: show local buienradar image

Post by marmachine »

Hi,

I have added a button showing buienradar for the entire country (netherlands), following the example in documentation.
Now i wanted to zoom in, in order to display more local area instead of the entire country.

Buienradar offers an iframe link to do that:

Code: Select all

<iframe src="https://gadgets.buienradar.nl/gadget/zoommap/?lat=52.34167&lng=5.62083&overname=2&zoom=8&naam=harderwijk&size=2b&voor=1" scrolling=no width=330 height=330 frameborder=no></iframe>
This link works on a plain HTML page and even when you simply paste the "src" value in a browser, however when i add this link to a button as image: link, this doesn't show.

Code: Select all

var buttons = {}
buttons.buienradar = {width:6, isimage:true, refreshimage:60000, image: 'https://gadgets.buienradar.nl/gadget/zoommap/?lat=52.34167&lng=5.62083&overname=2&zoom=8&naam=harderwijk&size=2b&voor=1', url:'https://api.buienradar.nl/image/1.0/RadarMapNL?w=500&h=512'}
Is there a way? Am i missing something?
Lokonli
Posts: 2292
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Howto: show local buienradar image

Post by Lokonli »

I use the following button definition:

Code: Select all

buttons.buienradar = {
        width:12, isimage:true, refreshimage:300000,
        image: 'http://api.buienradar.nl/image/1.0/RadarMapNL?w=360&h=300',
        url:'https://gadgets.buienradar.nl/gadget/zoommap/?lat=51.3578&lng=6.17428&overname=2&zoom=8&naam=5912TN&size=3&voor=1',
        framewidth:580, frameheight: 520
    }
The api.buienrader.nl link provides an image.
The gadgets.buienradar.nl links provides a HTML page.

You cannot use a html page as image in a button: you can place it in a frame instead.

Code: Select all

frames.buienrader = {
   frameurl: 'https://gadgets.buienradar.nl/gadget/zoommap/?lat=51.3578&lng=6.17428&overname=2&zoom=8&naam=5912TN&size=3&voor=1'
}
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests