[OpenLayers-Users] How to refresh a layer every N seconds?

geekjack geekjack at 163.com
Thu Aug 12 04:03:44 EDT 2010


Hi:
  Here is part of my codes:
  var cars = new OpenLayers.Layer.Vector("cars", 
      { strategies : [ new OpenLayers.Strategy.BBOX(),
	                   new OpenLayers.Strategy.Refresh({force: true, interval:
6000 } )] ,
                       protocol : new OpenLayers.Protocol.HTTP( {url :
"./xml/data.xml",format : myformat }),
       })
 /*As the code:I want the layer "cars" refresh itself every 6 seconds,how
can I define the it? and  which URL *should I Provide to the
"OpenLayers.Protocol.HTTP( {url : " ?  is the format "format:imge/png" would
be OK?
*I just could not understand smoe Properties of the
"OpenLayers.Layer.Vector" ,and there are few examples *for me to make me
understand it. Could you answer my question above?thank you!
*/
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-refresh-a-layer-every-N-seconds-tp5411253p5415257.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list