Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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. Its possible to load in store features by filter? i cant find any examples or documentations how to use it.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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,
    });
share|improve this answer
    
thanks for the explanation now please mark this as resolved. –  Sunil Jan 22 '13 at 6:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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