[ka-Map-users] Scale to viewport

David Badke dbadke at uvic.ca
Mon Jan 23 15:36:15 EST 2006

Using the CVS ka-Map version... I would like to be able to display a 
map, initially scaled so that it just fits in the viewport ("best fit"), 
leaving a few pixels around the edges. Of course, I don't know the size 
of the viewport when I am defining the set of scale factors to allow, 
and the viewport size could change during a session. I also don't want 
to have to define a lot of scale factors to match all possible viewport 
sizes! I had thought that the the "zoom to full extent" button  and the 
kaMap.zoomToExtents function would fit the image to the viewport, but if 
the scale factor calculated by zoomToExtents based on the viewport size 
is greater than the greatest defined scale factor, the greatest defined 
scale factor is used, rather than the calculated factor. Is the 
zoomToExtents function supposed to fit to the viewport? Or is there some 
other method I am missing that will do this?


More information about the ka-Map-users mailing list