[ka-Map-users] viewport width undefined
Scott Melby
melby at turnkey-technology.com
Thu Mar 9 11:02:42 EST 2006
Brent -
Thanks for the help. It did turn out to be the '\' that was trailing
the URL that was causing the JS error that I was seeing. However, I am
still having some trouble. The init.php is returning the following now
(note corrected scales and server URL).
/*init*/aszScales=new
Array(1750000,1000000,700000,350000,200000,100000,50000,35000,20000,10000,5000,3000);var
map = new _map( 'pams', 'PAMS', 0, 3,
aszScales);map.setDefaultExtents(-252600,-148033.591,274400,165545.107);map.setBackgroundColor('rgb(255,255,255)');map.addLayer(new
_layer( '__base__', true, 100, 'gif',false, new
Array(0,0,0,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/kamap/';this.tileURL =
'tile.php';this.selectMap('pams');
I get no JS errors, but I also get no displayed map. From a quick look
at init.php, it looks like the 'new Array(0,0,0,0,0,0,0,0,0,0,0,0)' is
saying that all of my layers should be invisible at every scale. But, I
can't see anything in my map file that should cause this. All layers
are set to "STATUS ON".
Thanks again
Scott
Brent Pedersen wrote:
>hi scott, the scales are the same, but the extents are different for the 2
>init.php outputs. why is that?
>
>also the url for the broken is: 'http://dev.keystoneresearchmap.org\/' with
>an extra '\' after the org. that might be enough to break it.
>
>-b
>
>
>
>On 3/8/06, Scott Melby <melby at turnkey-technology.com> wrote:
>
>
>>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
>>/*init*/aszScales=new
>>Array(2000000,1500000,1000000,750000,500000,100000,50000,25000,10000);var
>>map = new _map( 'pams', 'PAMS', 0, 5,
>>aszScales);map.setDefaultExtents(-80.815,39.59,-74.4,42.397
>>);map.setBackgroundColor('rgb(255,255,255)');map.addLayer(new
>>_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 =
>>'tile.php';this.selectMap('pams');
>>
>>init.php from broken server returns
>>/*init*/aszScales=new
>>Array(2000000,1500000,1000000,750000,500000,100000,50000,25000,10000);var
>>map = new _map( 'pams', 'PAMS', 0, 3,
>>aszScales);map.setDefaultExtents(-252600,-148033.591,274400,165545.107
>>);map.setBackgroundColor('rgb(255,255,255)');map.addLayer(new
>>_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 =
>>'tile.php';this.selectMap('pams');
>>
>>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 :(
>>
>>Thanks
>>Scott
>>
>>
>>
>>_______________________________________________
>>ka-Map-users mailing list
>>ka-Map-users at lists.maptools.org
>>http://lists.maptools.org/mailman/listinfo/ka-map-users
>>
>>
>>
>
>
>
More information about the ka-Map-users
mailing list