[mapguide-internals] Additional legend enhancements

Paul Spencer pagameba at gmail.com
Thu Sep 29 20:19:21 EDT 2011


There is a limit to the size of a data URI in IE 8 of 32k, this was removed in IE 9.  Returning a JSON array might be almost as space efficient and work in a single request.

I think this is a great idea in general.  I've been working on some mobile stuff lately with Sencha Touch and they embed images directly in css using data URIs, I was hoping we could improve the Fusion viewer somewhat by embedding the icons for buttons and other images directly into the CSS and cut down on the number of requests required to start up.

Cheers

Paul

On 2011-09-29, at 7:08 PM, Trevor Wekel wrote:

> Hi Jackie, Hi List,
> 
> 
> I was checking out Jackie's latest set of legend performance enhancements http://trac.osgeo.org/fusion/changeset/2428.  Very nice!
> 
> Since the legend images hit the full rendering stack, would it make sense to cache the images (maybe as javascript Data URIs) in the  resource data associated with the layer definition?  
> 
> We could also craft up an HTTP call to return the full set of legend images for a layer with one HTTP request using the Data URI's.  Seems as though most browsers support it with the exception of IE6 and IE7.  I'm not sure if there are any other limitations to this approach.  Perhaps Jackie has more insight.
> 
> And if the map definition and layer definitions do not change, we could even cache the entire HTTP/Data URI response as resource data associated with the map definition.  I suppose the Data URI response could grow to over a megabyte if there were 1000+ legend images to return (16pix x 16pix x RGBA = 1k per image).  At least there would be 999 less HTTP and render calls.
> 
> Anyone like this idea?  I have a client who may be interested in pursuing some legend performance improvements for the AJAX viewer.  Common infrastructure for legend caching Data URI's could be used by both viewers.
> 
> Regards,
> Trevor 
> 
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals



More information about the mapguide-internals mailing list