[ka-Map-users] JPEG output (and caching)

Paul Spencer pspencer at dmsolutions.ca
Thu May 19 07:52:26 EDT 2005


Um.  I haven't acctually tried JPEG output I guess.  You should have 
been able to do this by adjusting the image format in the maps array in 
config.php and then it would choose the appropriate format in 
setOutputFormat().

There is nothing on the client side that indicates the file type, so it 
is likely that if you change the file format, your browser will find the 
tile in its cache rather than requesting it from the server.

Tile urls are something like:

tile.php?l=<left pixel value>&t=<top pixel value>&s=<scale>&map=<map>

and the image headers are modified in tile.php to include aggressive, 
long term caching in the browser (at least as best as I know how to) so 
if you changed anything on the server without clearing the browser 
cache, you would still see the browser cache version I think.

This version is targetted at a more static installation ... if anyone 
has hints on how to make the browser ignore the browser cache on demand, 
I would be interested.

Do the jpeg images that get produced actually look right?

Paul

Delfos, Jacob wrote:
> I tried to configure it to output JPEG, having set the type to JPEG, and 
> changed imagepng to imagejpeg. But I only get broken images (both 
> explorer and firefox), even at the first load (where PNG did work). 
> Looking in the directory, it does seem to have created a number of jpeg 
> images, but these did not appear in the browser.
> 
> Another thing I can into: after changing to JPEG, I had to force the 
> browser to delete all temp files, because even with a shift-refresh it 
> was showing the old PNG files (which were not even in the temp directory 
> anymore). I can see how that would be a problem if the map content is 
> updated.
> 
> Regards,
> 
> Jacob
> 
> 
> 
> *JACOB DELFOS
> SPATIAL INFORMATION ANALYST
> *Maunsell Australia Pty Ltd
> 629 Newcastle Street, Leederville, WA 6007
> PO Box 81, Leederville, WA 6902
> Western Australia
> ABN 20 093 846 925
> 
> Tel     + 61 8 9281 6185
> Fax    + 61 8 9281 6297
> _jacob.delfos at maunsell.com_
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users

-- 
+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+


More information about the ka-Map-users mailing list