[Mapserver-users] can I use different symbols in thesamedynamiclayer?

Daniel Morissette morissette at dmsolutions.ca
Tue Sep 30 08:36:53 EDT 2003


Frieso ter Haseborg wrote:
> 
> Even if this gets slowly off topic - if you will excuse me - what's
> wrong with $newclass->label=$originalclass->label;
> 
> I must have a wrong understanding of the class-handling in
> PHP/MapScript. I thought I could transfer the whole sub-class (member)
> e.g. the label with all it's attributes set to another class. At least
> when I use a class in a class with pure PHP such operations are no
> problems, the sub-class with all it's attributes is given to the new
> class.
> 

You can't do this with PHP MapScript.  The reason is that the MapScript 
classes are not pure PHP classes, they are just wrappers on top of the 
low-level C structures.  When you assign label objects this way, only 
the PHP wrapper part of the object is copied, but the low-level C 
structure is not modified.  That's the same reason why you need to use 
the set() methods to set class member variables and cannot set them 
directly.

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




More information about the mapserver-users mailing list