help style->set(size,'size') ms-4.1.1

Daniel Lagos dlagos at FDCCONSULT.COM
Mon Feb 21 09:56:43 EST 2005


Hi Bart,

No, quotes around size are not necesary, it works fine with or without them
on  php-mapscript <= 4.2.5.

$style->set('size',20)

or

$style->set(size,20)

Thank's.

Have a nice Day.


----- Original Message -----
From: "Bart van den Eijnden" <bartvde at XS4ALL.NL>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Monday, February 21, 2005 9:32 AM
Subject: Re: [UMN_MAPSERVER-USERS] help style->set(size,'size') ms-4.1.1


> Hi,
>
> don't you need quotes around size?
>
> $oStyle->set('size'   , $aRec['s_size'] );
>
> Best regards,
> Bart
>
> > Hi List,
> >
> > This works php-mapscript 4.2.5 :
> >
> > $layer = $this->map->getLayerByName('layer_x');
> > $clase = $layer->getclass(0);
> > $style = $clase->getStyle(0);
> > $style->set(size,20);
> > $style->color->setRGB(255,0,0);
> >
> > The symbol size 20 works fine in php-mapscript 4.2.5.
> >
> > http://www.vianauta.com/test/error/image_ms-4.2.5.png
> >
> > But php-mapscript 4.4.1 the symbol syze is not correct, is very small.
> >
> > http://www.vianauta.com/test/error/image_ms-4.4.1.png
> >
> >
> > Object class produced ms-4.2.5:
> >
> > ms_class_obj Object ( [_handle_] => Resource id #158 [_layer_handle_] =>
> > Resource id #156 [_map_handle_] => Resource id #63 [name] => cliente
> > [title] => [type] => 0 [status] => 1 [template] => [numstyles] => 1
> > [label] => ms_label_obj Object ( [_handle_] => Resource id #159 [font]
=>
> > [type] => 1 [shadowsizex] => 1 [shadowsizey] => 1
[backgroundshadowsizex]
> > => 1 [backgroundshadowsizey] => 1 [size] => 2 [minsize] => 4 [maxsize]
=>
> > 256 [position] => 9 [offsetx] => 0 [offsety] => 0 [angle] => 0
[autoangle]
> > => 0 [buffer] => 0 [antialias] => -1 [wrap] => 0 [minfeaturesize] => -1
> > [autominfeaturesize] => 0 [mindistance] => -1 [partials] => 1 [force] =>
0
> > [color] => ms_color_obj Object ( [_handle_] => Resource id #160 [red] =>
> > 127 [green] => 0 [blue] => 0 ) [outlinecolor] => ms_color_obj Object (
> > [_handle_] => Resource id #161 [red] => 255 [green] => 255 [blue] =>
255 )
> > [shadowcolor] => ms_color_obj Object ( [_handle_] => Resource id #162
> > [red] => -1 [green] => -1 [blue] => -1 ) [backgroundcolor] =>
ms_color_obj
> > Object ( [_handle_] => Resource id #163 [red] => -1 [green] => -1 [blue]
> > => -1 ) [backgroundshadowcolor] => ms_color_obj Object ( [_handle_] =>
> > Resource id #164 [red] => -1 [green] => -1 [blue] => -1 ) ) [minscale]
=>
> > -1 [maxscale] => -1 )
> >
> > Object class produced ms-4.4.1:
> >
> > ms_class_obj Object ( [_handle_] => Resource id #158 [_layer_handle_] =>
> > Resource id #156 [_map_handle_] => Resource id #63 [name] => cliente
> > [title] => [type] => 0 [status] => 1 [template] => [numstyles] => 1
> > [label] => ms_label_obj Object ( [_handle_] => Resource id #159 [font]
=>
> > [encoding] => [type] => 1 [shadowsizex] => 1 [shadowsizey] => 1
> > [backgroundshadowsizex] => 1 [backgroundshadowsizey] => 1 [size] => 2
> > [minsize] => 4 [maxsize] => 256 [position] => 9 [offsetx] => 0 [offsety]
> > => 0 [angle] => 0 [autoangle] => 0 [buffer] => 0 [antialias] => -1
[wrap]
> > => 0 [minfeaturesize] => -1 [autominfeaturesize] => 0 [mindistance]
=> -1
> > [partials] => 1 [force] => 0 [color] => ms_color_obj Object ( [_handle_]
> > => Resource id #160 [red] => 127 [green] => 0 [blue] => 0 )
[outlinecolor]
> > => ms_color_obj Object ( [_handle_] => Resource id #161 [red] => 255
> > [green] => 255 [blue] => 255 ) [shadowcolor] => ms_color_obj Object (
> > [_handle_] => Resource id #162 [red] => -1 [green] => -1 [blue] => -1 )
> > [backgroundcolor] => ms_color_obj Object ( [_handle_] => Resource id
#163
> > [red] => -1 [green] => -1 [blue] => -1 ) [backgroundshadowcolor] =>
> > ms_color_obj Object ( [_handle_] => Resource id #164 [red] => -1 [green]
> > => -1 [blue] => -1 ) ) [minscale] => -1 [maxscale] => -1 )
> >
> >
> > Object style produced ms-4.2.5:
> >
> > ms_style_obj Object ( [_handle_] => Resource id #165 [_class_handle_] =>
> > Resource id #158 [_layer_handle_] => Resource id #156 [_map_handle_] =>
> > Resource id #63 [symbol] => 6 [symbolname] => industria [size] => 20
> > [minsize] => 8 [maxsize] => 20 [offsetx] => 0 [offsety] => 0 [color] =>
> > ms_color_obj Object ( [_handle_] => Resource id #166 [red] => 255
[green]
> > => 0 [blue] => 0 ) [backgroundcolor] => ms_color_obj Object ( [_handle_]
> > => Resource id #167 [red] => -1 [green] => -1 [blue] => -1 )
> > [outlinecolor] => ms_color_obj Object ( [_handle_] => Resource id #168
> > [red] => 0 [green] => 0 [blue] => 0 ) )
> >
> >
> > Object style produced ms-4.4.1:
> >
> > ms_style_obj Object ( [_handle_] => Resource id #165 [_class_handle_] =>
> > Resource id #158 [_layer_handle_] => Resource id #156 [_map_handle_] =>
> > Resource id #63 [symbol] => 6 [symbolname] => industria [size] => 20
> > [minsize] => 8 [maxsize] => 20 [offsetx] => 0 [offsety] => 0 [color] =>
> > ms_color_obj Object ( [_handle_] => Resource id #166 [red] => 255
[green]
> > => 0 [blue] => 0 ) [backgroundcolor] => ms_color_obj Object ( [_handle_]
> > => Resource id #167 [red] => -1 [green] => -1 [blue] => -1 )
> > [outlinecolor] => ms_color_obj Object ( [_handle_] => Resource id #168
> > [red] => 0 [green] => 0 [blue] => 0 ) )
> >
> >
> > It's a Bug?...Any suggestions would be much appreciated.
> >
> > Thank's.
> >
> > Daniel  A. Lagos  H.
> > dlagos at fdcconsult.com
> > Santiago, Chile.
>



More information about the mapserver-users mailing list