Label Isse

Shashi Gireddy gireddy at GMAIL.COM
Mon Apr 25 12:55:21 EDT 2005


here is a sample mapscript code...

// create new class object
$pop_undr_1500 = ms_newClassObj($layer);
            $pop_undr_1500->set(status, MS_ON);
            $pop_undr_1500->set(name, "POP2000 < 1500");
            $pop_undr_1500->setexpression('([POP2000]< 1500)');
           
        // create style
                $style = ms_newStyleObj($pop_undr_1500);
                $style->color->setRGB(255, 185, 15);
                $style->outlinecolor->setRGB(0, 0, 0);
           
          //let label properties
           $pop_undr_1500->label->set(type, MS_BITMAP);
           $pop_undr_1500->label->color->setRGB(255, 10 ,10);
           $pop_undr_1500->label->set(size, MS_LARGE);
           $pop_undr_1500->label->set(offsetx, 10);
           $pop_undr_1500->label->set(offsety, 10);


Hope this helps you, see label object for more attributes.

shashi.

On 4/25/05, Michael <chaumic at netvigator.com> wrote:
> Hello,
> I'm new to MapServer. My question is how to access each label by Mapscript so
> that I could format the text before it dispaly ? e.g. fix the decimal places.
> 
> Thanks
> 
> Michael
> 


-- 
Shashi Kiran Reddy. Gireddy,
Graduate Assistant,
CBER, University of Alabama.
http://www.cs.ua.edu/shashi
Home: 205-752-5137 Cell: 205-657-1438



More information about the mapserver-users mailing list