Sonntag, 1. Mai 2011

And 65.572.864 x 65.572.864 pixels in size. Or at least that's what the dimensions of the OpenStreetMap Mapnik base layer are, according to the OSM Wiki! Attaching a custom (i.e. non-Deep Zoom) tile source to Seadragon AJAX is really straightforward. To try this out, I added a simple OpenStreetMap Mapnik tile source implementation to my No.5 Seajax Utilities library. Demo embedded below, code on github as usual.

As a little more complex exercise, I've also added a tilesource implementation for the Tile Map Service (TMS) spec. TMS is also one of OpenLayers' supported formats, and you can generate TMS tilesets with tools such as MapTiler or (our own) MagickTiler.

Unfortunately, TMS has a little 'structural incompatiblity' with the Deep Zoom format, which will let TMS images appear slightly shifted to the lower left in Seajax. Eventually, I'd also like to add a Zoomify tilesource implementation (if there's ever the time to do it - the Math is slightly more complex there...). Zoomify wouldn't have this particular issue.

One issue that would remain, however, is the rather unattractive lines that show along the tile boundaries as the image zooms. (You can see it in the OSM demo above as well.) It's an issue the Seajax viewer generally has with any tile format that doesn't have overlapping tiles (that is to say ANY format except Deep Zoom...). And I'd really love to see it fixed. The Flash-based OpenZoom viewer doesn't have the same issue. So technically, I assume, there would be a way around. But right now it's probably wishful thinking, as official (open source) development on Seajax seems to be on hold. Hoping for the best that some's going to pick up on development! But at least there's some activity in that direction...