Hi,(sorry for my English)I've a GeoJson vecLayer and I use a PHP postgress
query , the result goes to a Geoext Store that i reload after the query and
show the results on the map perfectly. I decided to show those results in a
cluster, it's makes me halfway, until you don't reload the page it doesn't
load well. I got a strategy to refresh the vecLayer, but only works if i put
a refresth interval. I want to stop this interval and it waits for the next
run. For more than i look for this i don`t find an example of how to do it.
Does anyone know how to do it? ...var interval = 1000;...vecLayer2 = new
OpenLayers.Layer.Vector("vecLayer2", {                    projection:
map.displayProjection,                  /*preFeatureInsert: function(feature) { 
protocol: new OpenLayers.Protocol.HTTP({                                
url:'data/xxx'+sessionid+'.json',                                       format: 
OpenLayers.Format.GeoJSON(),                            }),                     
   strategies: [                                        new
OpenLayers.Strategy.Fixed(),                                    new 
20}),                                   new 
OpenLayers.Strategy.Refresh({active:true, interval:interval}),                  
],                         styleMap:new OpenLayers.StyleMap({                   
                "default": style,                               
"select":{                                              fillColor:"#e3f0ff",    
}),                             displayInLayerSwitcher: false,                  
        renderers:["Canvas", "SVG", "VML"],             
})...store = new GeoExt.data.FeatureStore({             autoDestroy: true,      
layer:vecLayer2,                root:'features',                fields:[        
                {name: 'id', type: 'double'},           
{name: 'name_es', type: 'string'},                      {name: 'description', 
type: 'string'},  
],              proxy: new GeoExt.data.ProtocolProxy({                          
protocol: new
OpenLayers.Protocol.HTTP({                                              url: 
format: new OpenLayers.Format.GeoJSON()                         })              
}),     });use Ajax to execute
the query and load the store.I want to stop the strategy refresh until the
next query.

View this message in context: 
Sent from the OpenLayers Users mailing list archive at Nabble.com.
Users mailing list

Reply via email to