[mapserver-dev] RE: [mapserver-users] PHP mapscript-how toaddlabel style

Andrew Monteiro amonteiro at dbxgeomatics.com
Tue Oct 25 11:17:23 EDT 2011


Ok. I'll switch packages and give it another try. :)

thanks!
Andy

-----Original Message-----
From: Alan Boudreault [mailto:aboudreault at mapgears.com] 
Sent: October 25, 2011 11:09 AM
To: Andrew Monteiro
Cc: mapserver-dev at lists.osgeo.org
Subject: Re: [mapserver-dev] RE: [mapserver-users] PHP mapscript-how
toaddlabel style

Ok, you are probably using an old C# binding. You will have to use the 
development package and rebuild your binding. 
release-1600-gdal-1-8-mapserver-6-0 is a stable package. I think this 
package should work: release-1600-gdal-mapserver

Alan

On 11-10-25 11:06 AM, Andrew Monteiro wrote:
> Hi Alan,
>
> Unfortunately there is no "insertStyle()" method on the labelObj class
> in C#.
>
> I can confirm that it is present for a classObj.
>
> Cheers,
>
> Andy
>
> -----Original Message-----
> From: mapserver-dev-bounces at lists.osgeo.org
> [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Alan
> Boudreault
> Sent: October 25, 2011 10:46 AM
> To: mapserver-dev at lists.osgeo.org
> Subject: Re: [mapserver-dev] RE: [mapserver-users] PHP mapscript-how
> toaddlabel style
>
> As mentionned in my previous mail, In all SWIG Bindings (this includes
> C#), you have to use the following label method:
>
> label.insertStyle(styleObj(null))
>
> Thanks,
> Alan
>
> On 11-10-25 10:46 AM, Andrew Monteiro wrote:
>> Hi Alan,
>>
>> "new styleObj()" is not permitted. I could use 'new styleObj(null)'.
>>
>> However that would give me a styleobj instance that is not associated
>> with anything. I'm trying to associate a style with a label, as per
> the
>> new organization.
>>
>> There is no way to assign a style object you create to anything
except
>> by using the constructor's classObj parameter. i.e. if I was to do
> "new
>> styleObj(null)" there is no way after that to associate that styleObj
>> instance with a class instance or a label instance.
>>
>> Hence, we need to add another constructor to the style object along
> the
>> lines of "new styleObj(someLabelObj)" or have some method that allows
> a
>> style object to be associated with a class instance and/or a label
>> instance.
>>
>> I'm not sure if you want to do it outside of the constructor in case
> you
>> end up with a styleObj instance associated with multiple
class/labels.
>> I'm not sure if that's a good thing for the internals, or a good
thing
>> programmatically either.
>>
>>
>> Hope that make sense.
>>
>> Cheers!
>>
>> Andrew
>>
>>
>> -----Original Message-----
>> From: mapserver-dev-bounces at lists.osgeo.org
>> [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Alan
>> Boudreault
>> Sent: October 25, 2011 8:39 AM
>> To: mapserver-dev at lists.osgeo.org
>> Subject: Re: [mapserver-dev] RE: [mapserver-users] PHP mapscript -how
>> toaddlabel style
>>
>> Andrew,
>>
>> Are you saying that "new styleObj()" is not allowed? I haven't
> modified
>> that part of swig... and checking the code parent_class==NULL is
>> supposed to be allowed.
>>
>> Alan
>>
>> On 11-10-24 12:04 PM, Andrew Monteiro wrote:
>>> Looks like the C# bindings did not get updated.
>>>
>>> I downloaded the latest daily build binaries from
>>> http://vbkto.dyndns.org/sdk/.
>>>
>>> MSVC2010 (Win32)
>>> release-1600-gdal-1-8-mapserver-6-0	
>>> finished at 2011.10.24. 8:12:20,18 	
>>> r12689, r23275
>>>
>>> I am using c# .Net4, and the only option I have for creating a Style
>>> object is
>>>
>>> new styleObj(classObj parent_class)
>>>
>>>
>>> Cheers,
>>>
>>> Andy
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: mapserver-dev-bounces at lists.osgeo.org
>>> [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Andrew
>>> Monteiro
>>> Sent: October 18, 2011 10:54 AM
>>> To: mapserver-dev at lists.osgeo.org
>>> Subject: RE: [mapserver-dev] RE: [mapserver-users] PHP mapscript -
> how
>>> toaddlabel style
>>>
>>> I'll try to get to the C# test later this week. I'm unfortunately
out
>> of
>>> the office most of today and tomorrow.
>>> Andy
>>>
>>> -----Original Message-----
>>> From: mapserver-dev-bounces at lists.osgeo.org
>>> [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Alan
>>> Boudreault
>>> Sent: October 17, 2011 4:56 PM
>>> To: mapserver-dev at lists.osgeo.org
>>> Subject: Re: [mapserver-dev] RE: [mapserver-users] PHP mapscript -
> how
>>> toadd label style
>>>
>>> I have committed a patch in trunk. Feel free to test. I have also
>> fixed
>>> the SWIG part... but only tested in python. If anyone could test it
> in
>>> java,perl or csharp, it would be nice.
>>>
>>> Note: to insert a style... it's different for php vs swig bindings.
>> Just
>>>
>>> use the same thing you would have used for the classObj:
>>>
>>> - PHP: new styleObj(myLabel)
>>> - SWIG: label.insertStyle(styleObj())
>>>
>>> Thanks,
>>> Alan
>>>
>>> On 11-10-17 01:15 PM, Alan Boudreault wrote:
>>>> I'm currently looking at this issue.
>>>>
>>>> Alan
>>>>
>>>> On 11-10-16 09:56 PM, Ian Walberg wrote:
>>>>> Folks,
>>>>>
>>>>> Is this something we can help add?
>>>>>
>>>>> Regards
>>>>>
>>>>> Ian
>>>>>
>>>>> -----Original Message-----
>>>>> From: mapserver-users-bounces at lists.osgeo.org
>>>>> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ian
>>>>> Walberg
>>>>> Sent: Monday, October 03, 2011 12:26 PM
>>>>> To: Steve Lime
>>>>> Cc: mapserver-users at lists.osgeo.org
>>>>> Subject: RE: [mapserver-users] PHP mapscript - how to add label
>> style
>>>>>
>>>>> http://trac.osgeo.org/mapserver/ticket/4038
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Steve Lime [mailto:sdlime at gmail.com]
>>>>> Sent: Wednesday, September 28, 2011 8:30 PM
>>>>> To: Ian Walberg
>>>>> Cc: mapserver-users at lists.osgeo.org
>>>>> Subject: Re: [mapserver-users] PHP mapscript - how to add label
>> style
>>>>>
>>>>> I'm guessing this is a bug, could you quick file a ticket and
we'll
>>> make
>>>>> sure this is addressed in 6.0.2?
>>>>>
>>>>> Steve
>>>>>
>>>>> On Tue, Sep 27, 2011 at 10:21 AM, Ian Walberg
>>>>> <ian.walberg at airborne.aero>    wrote:
>>>>>> Hello,
>>>>>>
>>>>>>
>>>>>>
>>>>>> I am sure it is staring me in the face but we cannot see how to
> add
>>> a
>>>>>> style to a label (Mapserver 6.x) using PHP mapscript.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Works fine via map file and we see the open issue with the save
> not
>>>>>> including the geotransform line.
>>>>>>
>>>>>>
>>>>>>
>>>>>> What are we missing?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>> Ian
>>>>>>
>>>>>> _______________________________________________
>>>>>> mapserver-users mailing list
>>>>>> mapserver-users at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> mapserver-users mailing list
>>>>> mapserver-users at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>> _______________________________________________
>>>>> mapserver-dev mailing list
>>>>> mapserver-dev at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>>>
>>>> _______________________________________________
>>>> mapserver-dev mailing list
>>>> mapserver-dev at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>>
>>> _______________________________________________
>>> mapserver-dev mailing list
>>> mapserver-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>> _______________________________________________
>>> mapserver-dev mailing list
>>> mapserver-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>> _______________________________________________
>>> mapserver-dev mailing list
>>> mapserver-dev at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>>
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev



More information about the mapserver-dev mailing list