[OpenLayers-Users] Filter logical Not + featureId not work (read and write)

Jimmy Aumard jimmy.aumard at gmail.com
Mon Jan 11 03:49:39 EST 2010


Hi Ivan,

Thanks for the link!

I have add this:

vavar sub = childFilter.CLASS_NAME.split(".").pop();
                if(sub === "FeatureId") {
                    for(var i=0; i<childFilter.fids.length; ++i) {
                        this.writeNode("FeatureId", childFilter.fids[i],
node);
                    }
                } else {
                    this.writeNode(
                        this.getFilterType(childFilter), childFilter, node
                    );
                }

For the writer of 'Not' filter and now I can write my filter correctly.
But now I have to read this sld.

For the moment I have this error:

obj.fids is undefined in v1.js (line 100)

I don't know what I have to change in readers to solved this.
Do you have an idea?

Regards

Jim

2010/1/10 Ivan Grcic <igrcic at gmail.com>

> Hi, check out this:
>
>
> http://n2.nabble.com/Fwd-Help-to-create-FeatureId-filter-OpenLayers-Filter-Logical-NOT-td4146688.html
>
> Cheers
>
> On Thu, Jan 7, 2010 at 9:34 AM, Jimmy Aumard <jimmy.aumard at gmail.com>
> wrote:
> > Hi,
> >
> > I try to create a filter like that:
> >
> > filter=new OpenLayers.Filter.Logical({
> >          type:"!",
> >         filters:[new OpenLayers.Filter.FeatureId({
> >                    fids: "test.4"
> >         })]
> > });
> >
> > It's work but when I would like to transform this in SLD like:
> > f=new OpenLayers.Format.Filter();
> > f.write(filter);
> >
> > I have this:
> > Filter writing not supported for rule type: undefined
> >
> > If I try to start with an SLD an make f.read() it's doesn't works too, I
> > have an empty filter Not.
> >
> > I use OpenLayers 2.8.
> > Anyone know how can make this kind of filter?
> >
> > Regards
> >
> > Jim
> >
> > --
> > Aumard Jimmy
> > Développeur
> >
> > KINAXIA
> > c/o CICA / PacaEst
> > 2229 Route des Crêtes
> > F-06560 Sophia Antipolis
> >
> > Tél.: +33 (0)4 8973 0242
> > Mob.: +33 (0)6 6017 2827
> > Fax : +33 (0)4 8307 6583
> >
> > http://www.kinaxia.fr
> >
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> >
> >
>
>
>
> --
> Ivan Grcic
>



-- 
Aumard Jimmy
Développeur

KINAXIA
c/o CICA / PacaEst
2229 Route des Crêtes
F-06560 Sophia Antipolis

Tél.: +33 (0)4 8973 0242
Mob.: +33 (0)6 6017 2827
Fax : +33 (0)4 8307 6583

http://www.kinaxia.fr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100111/c79dc9df/attachment.html


More information about the Users mailing list