[ka-Map-users] "Given map extent is invalid"

Paul Spencer pspencer at dmsolutions.ca
Wed Jan 11 11:26:44 EST 2006


Hi,

it seems odd that you have units DD and are not using degrees for  
your extents.  Try loading the map file with this php script:

<?php
dl('php_mapscript.dll');  //adjust to the appropriate version
$oMap = ms_newMapObj('c:/ms4w/apps/kamap-0.1.1/htdocs/global.map');
$oImg = $oMap->draw();
$szURL = $oImg->saveWebImage();
echo "<img src=$szURL>";
?>

If that works then there is a bug in ka-Map.

Cheers

Paul


On 10-Jan-06, at 7:11 PM, harry at politistaten.dk wrote:

> I have MapServer and ka-Map installed in latest versions provided  
> på MS4W.
>
> If i run 'shp2img' using global.map, it outputs a fine PNG. But  
> when i try
> to see it in ka-Map i get a popup with the following error message:
>
> <error>
> Warning: Invalid argument supplied for foreach() in
> C:\ms4w\apps\kamap-0.1.1\htdocs\init.php on line 75
>
> Fatal error: [MapServer Error]: setExtent(): Given map extent is  
> invalid.
> in C:\ms4w\apps\kamap-0.1.1\htdocs\init.php on line 93.
> </error>
>
> Seems like this guy got the same issue:
> http://lists.maptools.org/pipermail/ka-map-users/2005-December/ 
> 000636.html
> - but no fix.
>
> My global.map file:
> <file>
> MAP
>   NAME global_map
>   STATUS ON
>   SIZE 760 570
>   EXTENT 520000.000 6260001.840 539998.160 6280000.000
>   UNITS DD
>   IMAGECOLOR 255 255 255
>   IMAGETYPE png
>
>   WEB
>     IMAGEPATH "c:/ms4w/apps/kamap-0.1.1/htdocs/tmp/"
>     IMAGEURL "/ka-map/tmp/"
>   END
>
>   LEGEND
>     TRANSPARENT TRUE
>   END
>
>   SCALEBAR
>     TRANSPARENT TRUE
>   END
>
>   LAYER
>     NAME clouds
>     TYPE RASTER
>     STATUS ON
>     DATA "data\626520.tif"
>   END
>
> END
> </file>
>
> My config.php:
> <snippet>
> $aszMapFiles = array(
>   "mfg"   => array( "MFg", "c:/ms4w/apps/kamap-0.1.1/htdocs/ 
> global.map",
>                      array( 5000000, 2500000, 1250000, 750000 ),
>                      "PNG")
> );
> </snippet>
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>

+-----------------------------------------------------------------+
|Paul Spencer                           pspencer at dmsolutions.ca   |
+-----------------------------------------------------------------+
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
+-----------------------------------------------------------------+







More information about the ka-Map-users mailing list