[ka-Map-users] couple issues - maybe a cache bug

Paul Spencer pspencer at dmsolutions.ca
Wed Nov 22 08:47:05 EST 2006


Ravi, response inline ...

On 22-Nov-06, at 2:40 AM, Ravi wrote:

>
> Problem 1
> ----------
> First I noticed that most of my tile cache images were 200-1000  
> bytes but they were taking 4096 bytes on the disk. Hence to reduce  
> disk size I increased tile size from 256x256 to 1024x1024. I  
> thought this would also reduce number of http requests and speed up  
> the application.
>
> After this change, the tile cache images generated were between  
> 2k-10k. However due to this change, ka-maps seems to come to a  
> grinding halt. Even for extent/zoom tiles that were present in the  
> cache, it took very very long time for ka-maps to finish loading  
> the maps. Any idea why?

Each tile is now 16 times bigger.  ka-Map will still try to load a  
minimum of 9 tiles and possibly 16 tiles, regardless of the viewport  
size.

Also, depending on the number of tiles per metatile you have  
configured, you are causing a lot of work for mapserver.  If you've  
kept the default values of 6 x 6, you are asking mapserver to render  
a map that is 6144 x 6144 which is larger than mapserver is normally  
configured to deal with (max is 2048x2048 I think).  In general, I  
have not had good success asking mapserver to render images larger  
than this in any case.

>
>
> Problem 2
> ---------
> Then I tried to use metadata variable "tile_source" "auto" to  
> reduce php processing. However when I do that, the URL generated to  
> get the tile is completely wrong and hence does not work. This  
> seems like a bug and may have been fixed (I am using ka- 
> map-1.0.b1). The URL I see is something like
>
> http://localhost/undefinedGmap/layer1/25000000/layer1/def/tNaNlNaN/ 
> t-768l-768.png
>
> I noticed the first "undefined" comes from kaMap.js line 2205  
> "this._map.kaMap.webCache" . This variable is not defined.
>
> The tNANlNAN is the value of metaTileId at line 2203:
>
> var metaTileId = 't' + metaTop + 'l' + metaLeft;
>
> metaTop and metaLeft are calculated just a couple lines before  
> that. Somehow the calculation seems to producec NaN.
>

this is weird. You shouldn't need to use 'auto' since that is the  
default behaviour.  However, using it should not cause this problem.   
I'll try to take a look ... um, it only takes that path through the  
code if you use 'cache' in the metadata, in which case you should be  
defining the web-accessible location of the tile cache in config.php  
and pre-rendering all your tiles (notice the url goes directly to  
a .png rather than through tile.php).  Seems like a configuration  
problem right now.

Cheers

Paul

>
> Thanks for help
> Ravi
>
>
> _______________________________________________
> 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    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+






More information about the ka-Map-users mailing list