Shapefile field problem

Abe Gillespie agillesp at VT.EDU
Thu Dec 2 09:58:27 EST 2004


A good amount of fields aren't showing up in MapServer for me.  I use
the following PHP script to dump out all layers and their fields for
debugging.  Does MapServer have problems with certain data types or
certain values in a row?

Thanks for any help.
-Abe

[snip]
for ($i = 0; $i < $map->numlayers; $i++)
{
        $l = $map->getLayer($i);
        putBrLine($l->name);
        if ($l->type == 2)  // Shape files with data.
        {
                $l->open();
                $s = $l->getShape(-1, 0);
                $vals = $s->values;
                while ($fld = current($vals))
                {
                        putBrLine("&nbsp;&nbsp;".key($vals));
                        next($vals);
                }
                $s->free();
                $l->close();
        }
}



More information about the mapserver-users mailing list