[mapserver-users] getLayer()
Manuel Marichal Pérez
marichalperez at yahoo.es
Wed May 29 07:59:03 PDT 2002
Hi all. I'm having problems obtaining a layer. In my map, I've got only
two layers (one named "gc" and another one named "mun"). I can obtain
the name of the first layer doing:
<?
dl('php_mapscript_34.dll');
$path="c:\\inetpub\\wwwroot\\hristo2\\";
$map = ms_newMapObj($path."hristo.map");
$layer=$map->getLayer(0); <<----- The first layer
$foo=$layer->name;
?>
If I print '$layer->name' I obtain "gc". Good. But if I try to obtain the
name
of the second layer, impredictable results are shown:
<?
dl('php_mapscript_34.dll');
$path="c:\\inetpub\\wwwroot\\hristo2\\";
$map = ms_newMapObj($path."hristo.map");
$layer=$map->getLayerByName(1); <<----- Now the second one
$foo=$layer->name;
?>
If I try this, obtain only "non-printable" characters in '$layer->name'. It
seems
not to have obtain the layer properly. ¿...?.
What's the problem???
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
More information about the MapServer-users
mailing list