Changes between Initial Version and Version 1 of classObj


Ignore:
Timestamp:
Jan 29, 2009, 9:59:39 AM (15 years ago)
Author:
jmckenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • classObj

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