This post originated from an RSS feed registered with Ruby Buzz
by .
Original Post: Styling GeoRSS Points
Feed Title: cfis
Feed URL: http://cfis.savagexi.com/articles.rss
Feed Description: Charlie's Blog
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by
Latest Posts From cfis
Advertisement
As we add custom styles for MapBuzz, an obvious question is how to style GeoRss points. In particular, I would like to specify two images/icons for each Atom entry that has a GeoRss point - a normal image and a hover image for mouse overs.
I'm wondering if there is any community consensus on how to do this? Doing a bit of research, I found a discussion about this on the GeoRss mailing list in January. A good starting point is a post by Christopher Schmidt who talked about reusing KML, while Mikel Maron asked if reusing CSS was more appropriate.
I agree that styling information shouldn't be added to GeoRss and that reusing CSS is a good choice. However, CSS doesn't work for points when you want to represent them with an image/symbol. Based on its HTML heritage, CSS considers images to be markup and not presentation and thus does not support changing an image's src attribute. The closest it gets is supporting background images, but that seems like the wrong solution for this problem.
Thus, we need to find another solution. Some ideas I've pondered include:
1. Use KML as Chris suggested. It would look something like this:
The advantage to this approach is that Atom's content element already allows mixing in of XHTML, so there is some precedence. It also supports image sizes and we could hijack alt to specify different images types.
An SVG image introduces a funny twist - it let's you specify x and y values.I could see this being confused with the x/y values in a GeoRss point. Alternatively, it could be helpful to precisely postion this image. SVG images also support a number of style related attributes, such as opacity, which could be helpful.
Currently, option #4 looks like the best choice to me, but just wondering what other people think.