1

I have a FeatureStore:

        var protocol=new OpenLayers.Protocol.HTTP({
            url: "/geoserver/ows?service=WFS&request=GetFeature&typeName=xxxx:lineview&srsName=EPSG:4326&outputFormat=GML2",
    });
    zoomStore_disp = new GeoExt.data.FeatureStore({
        layer: myVecLayer_disp,
        fields: [
            {name: 'id', type: 'int'},
            {name: 'name_dispatcher', type: 'String'},
            {name: 'voltage', type: 'String'},
        ],
        proxy: new GeoExt.data.ProtocolProxy({
            protocol: protocol,
        }),
        autoLoad: true,
    });

But lineview layer contains too much features. So I must wait a lot of time before store is load. Is it possible to load in store features by filter?

I can't find any examples or documentations how to use it.

2

Yeah it was stupid question. But if someone interest for filter features you can use Openlayers.filter something like this:

        var protocol=new OpenLayers.Protocol.HTTP({
            url: "/geoserver/ows?service=WFS&request=GetFeature&typeName=xxxx:lineview&srsName=EPSG:4326&outputFormat=GML2",
    });
    featureFilter = new OpenLayers.Filter.Comparison({
        type: OpenLayers.Filter.Comparison.LIKE,
        property: "name_dispatcher",
        value:'value'
    });
    searchStore = new GeoExt.data.FeatureStore({
        layer: myVecLayer_disp,
        fields: [
            {name: 'id', type: 'int'},
            {name: 'name_dispatcher', type: 'String'},
            {name: 'voltage', type: 'String'},
        ],
        proxy: new GeoExt.data.ProtocolProxy({
            protocol: protocol,
        }),
        featureFilter:featureFilter,
        autoLoad: true,
    });
  • thanks for the explanation now please mark this as resolved. – Sunil Jan 22 '13 at 6:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.