[Mapserver-users] Gmap under mapserver 4

woodbri at swoodbridge.com woodbri at swoodbridge.com
Sun Jul 6 08:07:34 PDT 2003


Someone just posted a response this same question. Maybe it was on 
the maplab list. Anyway, I thing you need to change the line to read:

$oLayer->open();

The parameter is no longer used as the info is passed via the Layer 
object.

-Steve W.

On 4 Jul 2003 at 16:29, 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
> 
> 
> 
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 






More information about the MapServer-users mailing list