Mapscript and changes in the mapfile
    Luca Casagrande 
    luca.casagrande at GMAIL.COM
       
    Fri Jan 19 08:08:30 PST 2007
    
    
  
Hi to all!
I use mapscript just to add a certain layer in a mapfile.
Those are the lines:
        $layer = ms_newLayerObj($map);
        $layer->set('name', "voronoi");
        $layer->set('status', MS_DEFAULT );
        $layer->set('connection', $output[0]);
        $layer->set('type', MS_LAYER_POLYGON);
        $layer->set('transparency',"64");
        $layer->set('connectiontype',MS_OGR);
        $class = ms_newClassObj($layer);
        $style = ms_newStyleObj($class);
        $style=$class->getStyle(0);
        $style->color->setRGB(102,228,73);
        $style->outlinecolor->setRGB(0,0,0);
If i save the modified mapfile, all seem fine except that i see those lines
in my web section:
[..]
    QUERYFORMAT text/html
    LEGENDFORMAT text/html
    BROWSEFORMAT text/html
[..]
They weren't in the original mapfile and if i don't comment them,
shp2img stops with this error:
loadWeb(): Unknown identifier. Parsing error near (LEGENDFORMAT):(line
112) <br>
Thanks for your help
Luca
-- 
Join the world's largest wifi conunity! http://en.fon.com/
LINUX User #411601
GENTOO-GIS Development Team
jabber: casagrande at jabber.linux.it
 
    
    
More information about the MapServer-users
mailing list