Hi

using mapserver 5.0.2/php 5.2.5

im doing something like this:

      $map = ms_newmapobj("d:/msapps/gmap-ms40/htdocs/gmap75.map");
      $layer = $map->getLayerByName('road');
      $status = $layer->open();
      $status = $layer->whichShapes($map->extent);
      while ($shape = $layer->nextShape())
      {
         echo $shape->index ."<br>\n";
      }
      $layer->close();

when checking the $status value of the $layer->whichShapes($map->extent); instructions I get the values 0 or 2.
0 seems to be equal to MS_SUCCESS
but 2 is definitively not equal to MS_FAILURE

I did that:

if ($status === MS_SUCCESS) {
   print "success"; // 0
}  else if ($status === MS_FAILURE) {
   print "failure";  // 1?
} else {
   print "unknown"; // 2
}

I never get "failure", I only get "success" or "unknown"

so, what is the meaning of a code 2 value?

thanks in advance
Oliver
_______________________________________________
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to