Changes between Initial Version and Version 1 of PerlclassObj


Ignore:
Timestamp:
Jan 29, 2009, 10:31:23 AM (15 years ago)
Author:
jmckenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PerlclassObj

    v1 v1  
     1= classObj =
     2{{{
     3#!perl
     4$class = new mapscript::classObj($layer);
     5
     6$class->{label}->{autoangle} = 1;
     7$class->{label}->{sizescaled} = 8;
     8
     9$class->setExpression("\"${string_variable}\"");
     10$class->setExpression('/^{A-Z}/');
     11$class->setExpression('([LENGTH] gt 50 and [AREA] < 150000)');
     12$class->setExpression('N');
     13
     14my $s_class = $s_layer->getClass(0);
     15
     16$class->{color} = $map->addColor(0,255,0);
     17
     18# Example of creating a "canvas" image for adding legend icons to & adding 1 really big icon.
     19my $legend_img =  $class->createLegendIcon($rmap,$layer,200,100);
     20$class->drawLegendIcon($map,$layer,150,50,$legend_img,25,25);
     21}}}
     22----
     23back to PerlMapScript