Bundling mapserver data in image comment

Keith Sibson ksibson at matrix.net
Wed Jan 3 14:22:28 EST 2001


Hi,

I'm using an applet wrapper to provide the interface to mapserver, and am
passing data values from mapserver to the client through an html
template. For example, [img] and [mapext]. This means that every
interaction with the server requires two queries, one to get this data and
one to download the image. Setting mode=map could reduce this to one
query, but I can't compute the new extent on the client side because it
depends on several mapfile parameters that are not necessarily uniform
across different uses of the client applet. 

I thought that a way to optimize this could be to pack the necessary data
such as map extent into the image comment. This way the image and data
could be retrieved with a single query, since Java applets can access
image comments. I think JavaScript can too. Mapserver doesn't provide
direct support for this, but with the number of mapserver applications out
there that use Java and/or JavaScript wrappers, I think this would a
feature that could provide excellent performance improvements:

* Single HTTP query for single logical map operation.
* No need to read and write a temporary file.
* Don't need to periodically clean out temp image directories.
* Less load on server.
* Less load on network.

Presumably we would need an IMAGETEMPLATE field in the Web object, that
points to a file containing template variables and whatever else. I'm not
sure what the character limit in GIF comments are, or if TIFS or JPEGS
allow comments.

Please let me know what you think,

Keith.




More information about the mapserver-users mailing list