[MS4W-Users] MapServer 6.0.0-RC1 : 2 bugs

Jeff McKenna jmckenna at gatewaygeomatics.com
Thu May 5 14:58:24 EST 2011


Hello Thomas,

Thanks for your feedback (yes please always send your feedback to the 
mailing list).  My comments are inline below:

> On 11-05-05 11:14 AM, Thomas RAFFIN wrote:
>> Hi Jeff,
>>
>> I've just done few tests with ms4w 3.0.2 and mapserver 6.0.0-rc1, and I
>> think I've found 2 bugs. But I don't know if it is due to ms4w or
>> mapserver itself.
>>
>> 1) mapObj::clone method undefined
>>
>> With a simple PHP script like that:
>> <?php
>> $map = new MapObj('blabla.map');
>> $map2 = $map->clone();
>> ?>
>>
>> I've got this error:
>> "Call to undefined method mapObj::clone()"

This was a good question, I really had to dig into this myself to find 
out.  In fact for MapServer 6.0 there are no more clone methods, and I 
found a mention of this in this document (which is not yet public) 
http://www.mapserver.org/trunk/mapscript/php/migration_guide.html

That document contains this statement: "Cloneable objects should be 
cloned with the PHP clone keyword. There are no more clone methods."

and also:

"Class methods that have been removed:

         ...
         classObj: clone
         styleObj: clone
         mapObj: clone
"

Unfortunately this information isn't yet in the main MIGRATION_GUIDE, 
but thanks to your feedback we will make sure this is more clear.

So, in your case, you might do something like this instead for MapServer 
6.0 :

    <?php
      $map = new MapObj('blabla.map');
      $map2 = clone $map;
    ?>

Sorry for this confusion.


>>
>> 2) OFFSET tag in LABEL seems to follow scale (if man use
>> SYMBOLSCALEDENOM int he LAYER), whereas in previous MS version no...
>> Maybe it is not considerate as a bug, but a new bahaviour.
>> MAP
>> ....
>> LAYER
>> ....
>> SYMBOLSCALEDENOM 10000
>> LABEL
>> OFFSET 10 10
>> END
>> END
>> END
>>

I don't fully understand your issue.  You might want to bring that 
question to the main MapServer-users mailing list and ask there, as I 
don't know the answer.  I don't think anything specific changed 
regarding OFFSET (I do know that MapServer 6.0 allows for label STYLE 
objects, which is described in the migration guide, but I don't think 
that is related to your question).

-jeff


-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




More information about the MS4W-Users mailing list