[Mapserver-users] setFilter() Mapscript

Sean Gillies sgillies at frii.com
Thu Mar 6 08:40:52 PST 2003


On Thursday, March 6, 2003, at 09:19  AM, Daniel Morissette wrote:

> Sean Gillies wrote:
>>
>> As for resetting filter to its original state: I assume you mean a
>> NULL state?  Something like this:
>>
>>     layer.setFilter(None)
>>
>> Yes?  This cannot be done at present, but if you log into the
>> Mapserver bug tracker through the link on the mapserver home page
>> and enter this as a feature request for mapscript, I'll be happy to
>> add this to mapscript.
>>
>
> I didn't try it, but would have imagined that calling setFilter("")
> would do the trick.  If not then if you decide to add this feature I
> would suggest that you modify loadExpressionString() so that if the
> expression is an empty string then it's the same effect as setting the
> expression to NULL.  This way all flavors of MapScript will benefit 
> from
> this change at the same time without having to define 'None' or NULL in
> every language.
>
>
Daniel,

You are correct, setFilter("") returns -1 but does set the filter string
to NULL.  I'll leave setFilter() be.

My mistake.  I confused this issue with the outstanding issue that
string attributes cannot be undefined using their SWIG accessor 
functions.

peace,
Sean




More information about the MapServer-users mailing list