[mapserver-users] creating classes with mapscript

Nicolau Werneck nwerneck at yahoo.com.br
Wed Dec 26 08:06:46 PST 2001


Hello, folks... It's  me again! :]

OK, this definition in the .map file works (the code
of the location is displayed over it on the map):

LAYER NAME empresas DATA sedes TYPE annotation STATUS
default
  CLASSITEM 'CODIBGE'
  LABELITEM 'CODIBGE'
  CLASS EXPRESSION '3144508'
    LABEL TYPE truetype FONT verdanai SIZE 7 COLOR 0 0
0 POSITION auto END END
END

... but this piece of PHP/MapScript code doesn't
deliver the same results.  The map is displayed as if
the class is empty. The layer definition if there on
the .map, but no classes are defined on it:

$cla =
ms_newClassObj($map->getLayerByName("empresas"));
$cla->setexpression("'3144508'");
$cla->label->type=MS_TRUETYPE;
$cla->label->font="verdanai";
$cla->label->size=7;
$cla->label->color=$cor;
$cla->label->position=MS_UL;



shouldn't it give the SAME results? 

thanks...

++nicolau



_______________________________________________________________________________________________
Yahoo! GeoCities
Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis!
http://br.geocities.yahoo.com/



More information about the MapServer-users mailing list