[Mapserver-users] Label outlinecolor in PHP MapScript?

Daniel Morissette morissette at dmsolutions.ca
Mon Jan 5 08:52:44 PST 2004


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);

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the MapServer-users mailing list