[ka-Map-users] viewport width undefined

Scott Melby melby at turnkey-technology.com
Wed Mar 8 15:20:58 EST 2006

Hello -

I have recently installed ka-map using ms4w on my Win2k professional box 
and got it to serve my maps etc. perfectly.  I really like it!  However, 
now I am having some trouble moving it to a Win 2003 server box.  The 
symptom I am seeing is that I get a JS error from kaMap.js "Error: 
Invalid Argument".  Debugging the JS shows that I am in zoomToExtents() 
which was called from selectMap() which was called from the JS returned 
from init.php.  The issue is at the following line of code

this.theInsideLayer.style.left = -1*(vpLeft - this.xOrigin) + "px";
and the problem is that vpLeft is NaN (not a number) which stems from 
the fact that this.viewportWidth is also NaN.

I have done the following in an attempt to debug this
1) Verified that calling mapserver on that server directly via a URL 
returns a valid map.
2) Verified that calling init.php in the browser returns "reasonable 
looking" code.
3) Verified that php can create files in the configured ka-cache 
directory by creating a php page that creates a file and invoking it 
from a browser.

Here is some other potentially helpful information on this issue
init.php from working server returns
map = new _map( 'pams', 'PAMS', 0, 5, 
_layer( '__base__', true, 100, 'png',false, new 
Array(1,1,1,1,1,1,1,1,1)));map.resolution = 72;this.addMap( map 
);this.tileWidth=300;this.tileHeight=300;this.server = 
'http://cheyenne.turnkey-technology.com:88/kamap/';this.tileURL = 

init.php from broken server returns
map = new _map( 'pams', 'PAMS', 0, 3, 
_layer( '__base__', true, 100, 'gif',false, new 
Array(0,0,0,0,0,0,0,0,0)));map.resolution = 72;this.addMap( map 
);this.tileWidth=300;this.tileHeight=300;this.server = 
'http://dev.keystoneresearchmap.org\/';this.tileURL = 

We never see any tiles getting created in the tmp directory.

Any help is greatly appreciated.  I am sure this is a rookie config 
error :(


More information about the ka-Map-users mailing list