[Mapserver-users] Label outlinecolor in PHP MapScript?

Dylan Keon keon at nacse.org
Mon Jan 5 11:58:06 EST 2004


On 01/05/2004 08:52 AM Daniel Morissette wrote:
> Dylan Keon wrote:
> 
>> The following code gives me a "Call to a member function on a
>> non-object" error on line 84.
>>
>> Thanks,
>> Dylan
>>
>> 80  if($map->scale <= 140000) {
>> 81      $quad_layer = $map->getLayerByName('quad_index_24k');
>> 82      $quad_class = $quad_layer->getClass(0);
>> 83      $quad_style = ms_newStyleObj($quad_class);
>> 84      $quad_style->{label}->outlinecolor->setRGB(255,255,255);
>> 85  }
> 
> The label is still a member of the classObj, it is not part of the 
> styleObj. Try the following:
> 
>    $quad_class->label->outlinecolor->setRGB(255,255,255);


That did it.  Thanks Daniel.

--Dylan



More information about the mapserver-users mailing list