[mapserver-users] php Mapscript - update from string problem

Worth Lutz wal3 at mindspring.com
Thu Nov 12 20:58:50 EST 2009


Has anyone else tried to add a class to a layer with either:

 

$layer->updateFromString('LABEL CLASS NAME "Selected School" STYLE SYMBOL
school COLOR 255 125 0 SIZE 20 END LABEL TYPE truetype MINFEATURESIZE 50
MINDISTANCE 0 POSITION UC FONT vera SIZE 7 COLOR 255 125 0 END END END');

 

-or-

 

$class->updateFromString('CLASS NAME "Selected School" STYLE SYMBOL school
COLOR 255 125 0 SIZE 20 END LABEL TYPE truetype MINFEATURESIZE 50
MINDISTANCE 0 POSITION UC FONT vera SIZE 7 COLOR 255 125 0 END END'

);

 

When I tried this, the school symbol for my point is not used.  The points
show up as a single orange pixel under the label.  I used

 

 var_dump($class) 

 

and 

 

$class->symbol = 0

 

$class->symbolname = 'school'

 

This produced the problem result with the single pixel.

 

When I looked at the other symbols, the attribute

 

$class->symbol = 1

 

When I set the symbol separately with:

 

$style->set('symbolname', 'school');

 

The symbol attribute is set to 1 and the symbol is correctly used on the
map.

 

Apparently this is a problem with 'updateFromString' in PHP mapscript.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091112/e2f0c19d/attachment-0001.html


More information about the mapserver-users mailing list