[ka-Map-users] Vertically Stacked Data

Paul Spencer pspencer at dmsolutions.ca
Wed Jul 20 12:17:20 EDT 2005

Hi David,

It may be possible to define different tile sizes on a per layer (or 
group) basis but it would mean moving the logic from the kaMap object 
into the layer objects, or at least the definitions of what the tile 
sizes are.

I would be hesitant to undertake this myself, or to incorporate it into 
the core of the architecture, because it is both scary to make this kind 
of change and, IMHO, unnecessary.

Based on some recent experience adding overlays in kaMap, it appears 
that browsers can begin to choke on large images, especially IE.  If the 
image gets above a few thousand pixels per side then memory useage 
increases dramatically (500+ MB) ... so for this reason, I would not 
want to allow arbitrarily tile sizes in different layers.  Note that 
this is not based on the physical file size (which could, in fact, be 
very small as you noted), only the dimensions of the resulting image. 
So for very sparse images, as you zoom in, the file size won't get 
bigger but the image dimensions could get very large and effectively 
hose a client browser.

I don't really think there is a big performance hit in tiling these 
layers, since the individual tiles will be pretty small themselves. 
Perhaps I am wrong on this, though.

The added complexity of the code would likely add enough extra overhead 
in javascript processing to make it not worthwhile from an interactivity 
point of view ... I feel it is more important to the client to make the 
map move smoothly than to have the data appear more quickly and so I try 
to keep the inner loops involved in handling mouse movement as small as 

Finally, I think it would make adding certain other features very 
difficult.  For instance, it would be nice if kaMap scaled existing tile 
images while zooming in/out (perhaps in a timed loop) to provide a more 
continuous type of zoom (ala http://map.search.ch/).  This would be very 
difficult to accomplish if every layer needed to be handled differently.

Overall, I am not in favour of the changes you are proposing because any 
benefits would be outweighed by the potential downsides.  However, if 
you are keen to try it, I would be more than happy to take a look at the 
results and be proven wrong :)



David Bitner wrote:
> I am trying to get a feel for what it would take to extend ka-map to
> work with an idea I have or whether it would be easier to build from
> scratch.
> The data that I deal with has some layers that draw incredibly fast
> and create incredibly small images due to compression.  Other layers
> (or groups) create much larger images or involve time filtered data
> that would not be able to be cached and so would take longer to draw
> since a new map would need to be created for any possible time choice.
>  Currently I use a non-horizontally tiled interface that uses a
> separate mapfile for each group and draws them as stacked pngs with
> transparency.  The effect that this has is that when you pan (single
> click, not drag) or zoom the fast layers show up almost instantly,
> while the slower layers will build up the map with some time so you
> watch the map build while getting some reference data right away, so
> you could pan again before the slower data got there.
> The next step to this approach would be to combine the set scales and
> tiling that you are able to do with ka-map with the differences in
> file size per a given tile size.  For example, one of my layers is
> contours around an airport, another is a roads dataset for an entire
> metropolitan area.  The contours are so small when compressed that you
> could just have one image for each zoom level, meaning for that
> particular layer, you would never have to do any railroading, it would
> just be there.  The roads on the other hand would probably need to
> tile at 200px on a side across the metro area.  Another group of
> layers may be best tiled at 400px on a side.  From the way that you
> have ka-map built, what I would like to see added to ka-map would be
> the ability to use a different definition for each group (or separate
> each group out as different maps) and have individual parameters for
> tiling of each group including a bounding box outside of which there
> is no data so no map request would even be made.
> Does this seem feasible within the framework that you have set up?  If
> so, what pointers might you have for getting started?
> _______________________________________________
> 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