final class styleObj (View source)

Instances of styleObj are always embedded inside a classObj or labelObj.

Properties

float $angle
int $antialias
colorObj $backgroundcolor
colorObj $color
float $maxsize
float $maxvalue
float $maxwidth
float $minsize
float $minvalue
float $minwidth
int $offsetx
int $offsety
int $opacity

only supported for the AGG driver

colorObj $outlinecolor
string $rangeitem
float $size
int $symbol
string $symbolname
float $width

Methods

__construct(labelObj $label, styleObj $style)

The second argument 'style' is optional. If given, the new style created will be a copy of the style passed as argument.

ms_newStyleObj(classObj $class, styleObj $style)

Old style constructor

string
convertToString()

Saves the object to a string. Provides the inverse option for updateFromString.

void
free()

Free the object properties and break the internal references.

string
getBinding(mixed $stylebinding)

Get the attribute binding for a specfiled style property. Returns NULL if there is no binding for this property.

string
getGeomTransform()

No description

int
removeBinding(mixed $stylebinding)

Remove the attribute binding for a specfiled style property.

int
set(string $property_name, $new_value)

Set object property to a new value.

int
setBinding(mixed $stylebinding, string $value)

Set the attribute binding for a specfiled style property.

int
setGeomTransform(string $value)

No description

int
updateFromString(string $snippet)

Update a style from a string snippet. Returns MS_SUCCESS/MS_FAILURE.

Details

final __construct(labelObj $label, styleObj $style)

The second argument 'style' is optional. If given, the new style created will be a copy of the style passed as argument.

Parameters

labelObj $label
styleObj $style

final styleObj ms_newStyleObj(classObj $class, styleObj $style)

Old style constructor

Parameters

classObj $class
styleObj $style

Return Value

styleObj

final string convertToString()

Saves the object to a string. Provides the inverse option for updateFromString.

Return Value

string

final void free()

Free the object properties and break the internal references.

Note that you have to unset the php variable to free totally the resources.

Return Value

void

final string getBinding(mixed $stylebinding)

Get the attribute binding for a specfiled style property. Returns NULL if there is no binding for this property.

.. code-block:: php $oStyle->setbinding(MS_STYLE_BINDING_COLOR, "FIELD_NAME_COLOR"); echo $oStyle->getbinding(MS_STYLE_BINDING_COLOR); // FIELD_NAME_COLOR

Parameters

mixed $stylebinding

Return Value

string

final string getGeomTransform()

No description

Return Value

string

final int removeBinding(mixed $stylebinding)

Remove the attribute binding for a specfiled style property.

Added in MapServer 5.0. .. code-block:: php $oStyle->removebinding(MS_STYLE_BINDING_COLOR);

Parameters

mixed $stylebinding

Return Value

int

final int set(string $property_name, $new_value)

Set object property to a new value.

Parameters

string $property_name
$new_value

Return Value

int

final int setBinding(mixed $stylebinding, string $value)

Set the attribute binding for a specfiled style property.

Added in MapServer 5.0. .. code-block:: php $oStyle->setbinding(MS_STYLE_BINDING_COLOR, "FIELD_NAME_COLOR"); This would bind the color parameter with the data (ie will extract the value of the color from the field called "FIELD_NAME_COLOR"

Parameters

mixed $stylebinding
string $value

Return Value

int

final int setGeomTransform(string $value)

No description

Parameters

string $value

Return Value

int

final int updateFromString(string $snippet)

Update a style from a string snippet. Returns MS_SUCCESS/MS_FAILURE.

Parameters

string $snippet

Return Value

int