Monthly Archives: June 2015

QDCSS : Quick and Dirty CSS Sprites

qdcss
Ah, spriting.

When I think about sprites, my mind goes directly to the NES, and SNES era.

snests4nintendones

The graphics were meshed together in a way that was easier to handle than multiple images. And well, now they have this nostalgic appeal. I can’t watch this without a smile.

Luigi Sprite from Super Mario Bros.

Luigi Sprite from Super Mario Bros.

As old as 10 years ago (already? :-O) A list apart published an amazing article on how to use this same idea to reduce the amount of browser petitions for images. That article is wonderful, but apart (hehe) from that, it urges people to think creatively!

Long story short, this is going to be a post on how to create a CSS sprite image and stylesheet with 100 lines of python.

CSS sprite generator python

Leave a comment

Filed under code, tools

SLD in HTML and SVG

sld

A standard way to style any OGC layer is using SLD. Styled Layer Descriptors.

The Styled Layer Descriptors are a simple (and standard) way to style your web maps. But when you style you also want to generate a nice legend for it.

I recently found myself with the situation of reworking a website styling code. Instead of writing it from scratch we used existing pieces to cleanly fill our webapp divs with the correct legend.

Let’s style!

1 Comment

Filed under code, gis, Maps