[ka-Map-users] Problems with KaMap tile.php, with MapServer 5.6

Daniel Morissette dmorissette at mapgears.com
Thu Jun 10 12:37:54 EST 2010


Thanks for reporting this issue. FYI we will fix this in MapServer 5.6.4 
and 6.0 so that the order of items in the array comes back to what it 
used to be.

More info at http://trac.osgeo.org/mapserver/ticket/3173#comment:18

Daniel


Joe Franklin wrote:
> I noticed that as well - you have to modify tile.php, as well as 
> kaMap.js for MapServer 5.6+ by adding the value for the number of inches 
> per nautical mile.  Otherwise it fails for any map that uses decimal 
> degrees.
>  
> Change:
> var inchesPerUnit = new Array(1, 12, 63360.0, 39.3701, 39370.1, 4374754);
> To:
> var inchesPerUnit = new Array(1, 12, 63360.0, 39.3701, 39370.1, 
> 72913.3858, 4374754);
> 
> --- On *Wed, 6/9/10, Jeff Dege /<jeff.dege at korterra.com>/* wrote:
> 
> 
>     From: Jeff Dege <jeff.dege at korterra.com>
>     Subject: [ka-Map-users] Problems with KaMap tile.php, with MapServer 5.6
>     To: "ka-map-users at lists.maptools.org" <ka-map-users at lists.maptools.org>
>     Date: Wednesday, June 9, 2010, 4:21 PM
> 
>     We've been running a few map servers on Windows, using KaMap to
>     deliver tiles, for a couple of years.  I'm trying to move one of
>     them onto a new Ubuntu box, and I'm having problems.
> 
>      
> 
>     My problem is when I try to access a tile from a browser, passing
>     args directly to tile.php in the URL:
> 
>      
> 
>        
>     http://10.0.0.59/testmap/tile.php?map=testmap&g=all&i=gif&t=-11200&l--29000&s-1000000
> 
> 
>      
> 
>     The browser is finding tile.php without problems, but Apache is
>     returning "HTTP 500 Internal Server Error".
> 
>      
> 
>     Looking in the apache logs, I see:
> 
>      
> 
>     [Wed Jun 09 14:02:42 2010] [error] [client 127.0.0.1]
> 
>     PHP Notice:  Undefined offset: 6 in /var/www/testmap/htdocs/tile.php
>     on line 229
> 
>      
> 
>     [Wed Jun 09 14:02:42 2010] [error] [client 127.0.0.1]
> 
>     PHP Warning:  Division by zero in /var/www/ testmap /htdocs/tile.php
>     on line 229
> 
>      
> 
>     So I look at my tile.php.   Lines 228 and 229 are:
> 
>      
> 
>             $inchesPerUnit = array(1, 12, 63360.0, 39.3701, 39370.1,
>     4374754);
> 
>             $geoWidth =
>     $scale/($oMap->resolution*$inchesPerUnit[$oMap->units]);
> 
>      
> 
>     It looks like "$oMap->units" has the value "6", which is not a valid
>     index into $inchesPerUnit, so we get the errors, above.
> 
>      
> 
>     The mapfile contains "UNITS DD"
> 
>      
> 
>     My first thought was that since I'd installed a more recent version
>     of mapserver on the unix box than had been running on the windows
>     box, maybe php_mapscript.so's ms_newMapObj() function is returning a
>     different set of values in units.  But I downloaded the most recent
>     version of tile.php, and in it the $inchesPerUnit array has the same
>     values.
> 
>      
> 
>     OTOH, a glance at the mapserver 5.6.3 source reveals:
> 
>      
> 
>        enum MS_UNITS {MS_INCHES, MS_FEET, MS_MILES, MS_METERS,
>     MS_KILOMETERS, MS_NAUTICALMILES,
> 
>           MS_DD, MS_PIXELS, MS_PERCENTAGES};
> 
>      
> 
>     Which gives MS_DD the value of 6.
> 
>      
> 
>     So, am I correct in my understanding that the version of tile.php I
>     am using will not work with mapserver 5.6 without modifications?
> 
>      
> 
>     I downloaded kamap from
>     http://ka-map.maptools.org/index.phtml?page=downloads.html.  The
>     tile.php in it is v 1.41.  (The one I was using on the Windows box
>     was v 1.1).
> 
>      
> 
>     Is there a more recent version of KaMap, than the one I downloaded
>     from maptools.org?
> 
>      
> 
>     Is there any version of KaMap that has kept up-to-date with current
>     developments in mapserv?
> 
>      
>     -----Inline Attachment Follows-----
> 
>     _______________________________________________
>     ka-Map-users mailing list
>     ka-Map-users at lists.maptools.org
>     <http://us.mc1144.mail.yahoo.com/mc/compose?to=ka-Map-users@lists.maptools.org>
>     http://lists.maptools.org/mailman/listinfo/ka-map-users
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users


-- 
Daniel Morissette
http://www.mapgears.com/


More information about the ka-Map-users mailing list