Hi,

What is happening not correctly in your opinion. the use of the RefreshStrategy 
is correct.
Are you seeing your features on the map?
If not i think since you get you're data from a local xml file it can be a same 
origin policy problem.
If you can see your features i think the refresh is working correctly but the 
same data is shown.

Hope this helps you a bit in finding the problem.

Cheers Kris
Met vriendelijke groet, Kind regards,

Kristiaan Geusebroek
Consultant


[cid:image005.jpg@01CAD62A.CDCB6570]
[cid:image006.png@01CAD62A.CDCB6570]


Email: kgeusebr...@xebia.com<mailto:kgeusebr...@xebia.com>
Tel: +31 (0)35 538 1921
Fax: +31 (0)35 538 1922
Mobiel: +31 (0)6 3069 7223

Utrechtseweg 49
1213 TL Hilversum
The Netherlands
http://www.xebia.com<http://www.xebia.com/>

Xebia Blog: http://blog.xebia.com/
Xebia Podcast: http://podcast.xebia.com/


On Aug 12, 2010, at 10:03 AM, geekjack wrote:


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<http://Nabble.com>.
_______________________________________________
Users mailing list
Users@openlayers.org<mailto:Users@openlayers.org>
http://openlayers.org/mailman/listinfo/users

<<inline: image005.jpg>>

<<inline: image006.png>>

_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to