http://mapbox.com/mbtiles-spec/utfgrid/
edit: TileMill is also a really cool example of using Backbone.js + Bones to build a Desktop app: https://github.com/mapbox/tilemill/tree/master/models
http://mapbox.com/mbtiles-spec/utfgrid/
edit: TileMill is also a really cool example of using Backbone.js + Bones to build a Desktop app: https://github.com/mapbox/tilemill/tree/master/models
I use this kind of pixel grid which brings those advantages, especially for very large maps :
- use of the image (with carefully chosen colors) as a direct preview of the map (depending on the resolution)
- efficient (bidirectional) PNG compression
- use of already present image manipulation libraries for all kind of manipulation (like layers addition)
What's the benefit of using UTF characters ?
As a side note, I send my PNG when needed in JSON (larger, with base64 encoding, I didn't try to make a comparison with ASCII art format) and I find that with getImageData getting the indexed colors is fast and easy. I was referring to bidirectional compression because PNG filter (applied before the deflate) uses the fact that pixels are often similar on both axes.
Of course, without a few tests and comparisons, I can't be sure I really gain in size, but I like to use the fact that my map is an image (faster to draw on the screen at some resolutions and image manipulation server side - my zero indexes are simply mapped to the transparent "color" as is common in most color palettes).
I have different constraints trough, as my map contains 3200x1600 pixels and not 64x64, so that I really need those compressions for instant display.