[mapserver-users] Opening layer with PHP/Mapscript
Natán
natancalzolari at gmail.com
Wed Sep 2 00:45:53 PDT 2009
In my PHP code I do:
$map = ms_newMapObj("docs/distrito.map");
$layer = $map->getLayerByName("Distrito");
$layer->open();
The open() method returns me a warning like this:
Warning: [MapServer Error]: msShapefileOpen():
(/var/www/ajax/docs/distrito.dbf) in /var/www/ajax/index.php on line 6
I know the map has loaded properly because I tried echoing
$map->numlayers and it outputs the number of layers correctly.
Also, the layer has loaded properly; I tried echoing
$layer->numclasses and it outputs correctly.
But when trying to use the open method, I get that problem. It points
at the .DBF file, I don't know which could be the problem.
Any help would be amazing.
Natán
More information about the MapServer-users
mailing list