[aprssig] Comments on this one?

Tom Hayward esarfl at gmail.com
Wed Jan 29 00:20:45 EST 2014


On Tue, Jan 28, 2014 at 6:52 PM, Steve Dimse <steve at dimse.com> wrote:
> Man, I have to wonder what kind of display you are looking at this on! The png is produced at 1850 pixels wide, chosen to look nice natively on a Retina iPad. When you say xsize=800, that does not change the resolution the image is drawn at, it changes the image tag in the html to put the 1800pixel image into an 800 wide space

I think we're using the word "scale" in different contexts here.
"Responsive" might be a better term. When my browser window is small,
I want the graphic to be small. When my browser window is large, I
want the image to be large. I see now you have provided a url
parameter to assist with sizing, but it would be a better experience
if the webpage could figure this out for me.

You could achieve this by simply giving the img tag a CSS style of
"width:100%". The image will then always been full browser width, no
url parameter needed.

The point of SVG is to avoid having to send an 1800px image to
everyone. There's no need to cater to the largest possible screen size
because the graphic can infinitely scale itself.

> svg is tough because GD does not draw natively in that, so I need to switch graphic libraries, and you’ll have to try hard to convince me anyone needs that resolution.

It's not tough; it's actually quite simple! SVG is a graphics language
of its own. You don't need GD. It is based on XML and you can generate
it with your perl just as you generate HTML pages.

This weather graphic is very simple so it's a great place to start
with SVG. Here's an example for the wind circle:
http://oreilly.com/catalog/svgess/chapter/ch03.html#t4

You can serve the SVG inline with the HTML. This will halve the number
of hits on your server for this tool. There's no need for a URL
parameter for width, so you can serve the same cached HTML to
everyone.

You can see from the example that the result will be very lean--much
leaner than the 34 KB PNG you're serving now. This makes it much more
reasonable to cache in memory, saving you database hits for popular
stations.

>> It would also be nice if the refresh were done on the content only, so
>> the entire page didn't need to be re-rendered (this results in a flash
>> of white from the browser).
>
> I’ll look at that. Personally I like the flash because it alerts me the data has updated (and since the updates are now timed with the real data it makes sense). Maybe I can make a smoother option somehow.

I am the opposite. When things are working normally, I want it to be
unobtrusive (not flashing) and just show me the data. The timer is
acceptable. When it fails to reload for a while, turn the data red so
I know it's stale. Basically: alert me to the failure, not the reload.

Tom KD7LXL



More information about the aprssig mailing list