[Mapserver-users] Re: Gmap under mapserver 4

Yewondwossen Assefa assefa at dmsolutions.ca
Fri Jul 4 10:30:47 EDT 2003


Try to do $oLayer->open() with no argument. This changed between 3.6 and 
4.0.

Later

Bart van Heijningen wrote:

>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
>
>
>
>
>
>  
>

-- 
----------------------------------------------------------------
Assefa Yewondwossen           
Software Analyst   

Email: assefa at dmsolutions.ca    
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax:   (613) 565-0925
----------------------------------------------------------------








More information about the mapserver-users mailing list