[ka-Map-users] centering viewport on generated tiles

Sébastien Roch sebastien.roch at epfl.ch
Wed Mar 21 06:31:25 EST 2007

Hi everybody,
We've made an application with ka-map having a viewport of about 500/350
pixels. My problem is that the viewport is not centered on the generated
tiles : there are many columns of tiles on the right, but just one column on
the left (see http://demo.kamap.swissgeo.ch/screenshots.html for
I didn't find the way to get it centered, any idea? And is it possible to
generate less tiles if I have a very small viewport?

URL is : http://demo.kamap.swissgeo.ch/gastrofuhrer/

my drawPage function is :

function drawPage(x,y) {
    var viewport = getRawObject('viewport');

	viewport.style.width = x + "px";
	viewport.style.height = y + "px";

Thanks for your help!

More information about the ka-Map-users mailing list