[Users] GeoExt.data.FeatureStore and layer features information

Lluís Peinado peinado.l at gmail.com
Mon Apr 19 00:59:36 CEST 2010


Hi everyone, this is my first message to the list.
I'm working on an application based on this
example:http://dev.geoext.org/trunk/geoext/examples/feature-grid.html

I have a problem using my own application and also debugging the
example's code, I create a vector layer and a FeatureStore with this
    // create vector layer
    var vecLayer = new OpenLayers.Layer.Vector("vector");
    map.addLayers([wmsLayer, vecLayer]);



    // create feature store, binding it to the vector layer
    store = new GeoExt.data.FeatureStore({
        layer: vecLayer,
        fields: [
            {name: 'name', type: 'string'},
            {name: 'elevation', type: 'float'}
        ],
        proxy: new GeoExt.data.ProtocolProxy({
            protocol: new OpenLayers.Protocol.HTTP({
                url: "data/summits.json",
                format: new OpenLayers.Format.GeoJSON()
            })
        }),
        autoLoad: true
    });

It really works fine, but when I want to read the vector layer features i
can't localize them, things like:
this.store.layer.features[] has no point features as spected on an
OpenLayers vector layer
I've tried also to look at

this.mapPanel.map.layers[1].features[]

but no success, only "remove" method is listed on firebug watcher.
Is there anyway to access this data?, is just I need to read the point
coordinates to center the map and things like that.

Thanks a lot for any suggestion.
Lluís.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20100419/06924b45/attachment.htm 


More information about the Users mailing list