[Mapserver-users] Gmap under mapserver 4

Bart van Heijningen bart at atsence.nl
Fri Jul 4 10:29:37 EDT 2003


Hi,

I wonder if anyone here can help me with the next question.
I am using mapserver 4 and try to get the gmap demo to work. All seems
fine but I cannot seem to be able to get the querying right. 
It simply does not work.
Maybe someone knows what the problem is?
Somehow it no longer seems to be happy with the dbf file under
Mapserver4.
Looks like it does not like the amount of return fields from the query.
Error:

Warning: Wrong parameter count for open() in
/www/htdocs/atmspoc/htdocs/poc_gmap75.php on line 698

Fatal error: MapServer Error in msLayerGetShape(): Shapefile layer has
not been opened. in /www/htdocs/atmspoc/htdocs/poc_gmap75.php on line
729

Here is the gmap file the last line ¨$oLayer->open($gpoMap->shapepath);¨
produces the error.


 for($iLayer=0; $iLayer < $gpoMap->numlayers; $iLayer++)
    {
        $oLayer = $gpoMap->GetLayer($iLayer);

        $numResults = $oLayer->getNumResults();

        if ($numResults == 0)
            continue;  // No results in this layer

        // Open layer's table... take the list of fields to display
from
        // the "HEADERRESULT_FIELDS" metadata in the layer object.
        $oLayer->open($gpoMap->shapepath);

        $selFields = explode(" ",
$oLayer->getMetaData("RESULT_FIELDS")); 



Thanks,
Bart







More information about the mapserver-users mailing list