[mapguide-internals] CSS sprited legend images - RFC
jason at jasonbirch.com
Sun May 22 06:05:08 EDT 2011
Every legend image for a layer, or for a map? I think it would be cool if
you could just do a single call to get the entire legend including icons as
JSON (gzip-compressed of course), which could then be used to build and
modify the DOM for the legend based on zoom level. It'd have to be
re-fetched any time a new layer was added, but still...
On 21 May 2011 23:12, Zac Spitzer wrote:
> Jackie and I have been working on this, we have extended
> to include the legend icon images as base64 data encoded urls. the
> images are usually
> 130 odd bytes in size so the base64 encoded version is still small enough
> not to
> matter much.
> It works well, reducing the server load and allowing for speeding the
> load time for
> complex maps. The load time performance of one extremely complex map was
> reduced by half, only IE7 / IE6 don't support this. IE8 works ok, taking
> to completely load this map gracefully, FF4/Chrome can load the same map in
> But the crux of the problem is still the sheer number of
> GETLEGENDIMAGE api requests.
> Even doing this via the API is too slow, we have been limiting loading all
> legend images for every scale, leaving some images still to use the
> original web tier urls.
> I would like to propose a new GETLEGENDIMAGES API call which generates
> every legend
> image for a given layer, returning them in a json structure, base64
> encoded, similar to what we
> are returning from LoadScaleRanges.
> Ideally, the logic from fusion's LoadMap.php and LoadScaleRanges.php
> could be moved into
> the server api, which would eliminate all the calls to read and parse
> the layer definitions
> from the server into the webtier, eliminating a lot of tcp/ip overhead.
More information about the mapguide-internals