[OpenLayers-Dev] HTTP Protocol callback function not being invoked

joe.tito joetito1 at gmail.com
Tue Aug 23 12:44:16 EDT 2011


I have created a vector layer that auto refreshes every 60 seconds that reads
from a GeoRSS feed via the HTTP protocol. I'm trying to execute a body of
code after every read, but the callback method of the HTTP protocol doesn't
seem to invoke. Any advice would be much appreciated.

Here's my code for the vector layer:

markers = new OpenLayers.Layer.Vector("Markers", {
    strategies: [new OpenLayers.Strategy.Fixed(), 
                     new OpenLayers.Strategy.Refresh({interval:
refreshTime}),
                     new OpenLayers.Strategy.Cluster({distance: 15,
threshold: 1})],
    protocol: new OpenLayers.Protocol.HTTP({
        url:  geoRssFeed,
        format: new OpenLayers.Format.GeoRSS(),
        callback: function() { alert("HELLO!"); }    *<-----not invoking*
    }),
    styleMap: new OpenLayers.StyleMap({"default": style})
});

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/HTTP-Protocol-callback-function-not-being-invoked-tp6716923p6716923.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list