setUrl is likely meant to get an url to an georss-file and not to interprete an returned georss-string.
Arnd Wippermann -----Ursprüngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Deli Soetiawan Gesendet: Mittwoch, 8. Oktober 2008 08:42 An: [email protected] Betreff: [OpenLayers-Users] Any idea of using setUrl on GeoRSS layer? Hi there, i tried to create a georss layer that can do auto-refresh after specified time, here the code for layer: var iconMarker = new OpenLayers.Icon("images/markerblue.png", new OpenLayers.Size(16,16)); var rssLayer = new OpenLayers.Layer.GeoRSS('GeoRSS','georss.php',{icon:iconMarker}); map.addLayer(rssLayer); here the code for refreshing georss layer: setInterval(reloadRSS,60000); //reload every 60 seconds function reloadRSS() { rssLayer.setUrl('georss.php'); } the georss.php generate dynamic georss from database (not really important what the content is) according to: http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer/Ima ge.js setUrl function was defined, the parameter for this function is url of the georss, so it can be use to reload the xml (formerly in Kamap application i've made i use this kind of function) but it can't work? when i debug using JS debugger (in Opera 9.6 Final): Timeout thread: delay 60000 ms Error: name: TypeError message: Statement on line 41: Type mismatch (usually non-object value supplied where object required) the line 41 is referencing to "rssLayer.setUrl('georss.php');" code, so why type mismatch? do i set invalid type for parameter? is it correct to use string ("georss.php") as parameter? or any other way to refresh this layer type? (if you can please share some working example :D) Thanks, Deli Soetiawan -- View this message in context: http://www.nabble.com/Any-idea-of-using-setUrl-on-GeoRSS-layer--tp19873179p1 9873179.html Sent from the OpenLayers Users mailing list archive at Nabble.com. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
