On Wed, 2008-11-05 at 23:23 +0100, Eric Lemoine wrote:
> Hi. How do you register your callback? Sorry i don't see what you're
> talking about. Eric

Hi Eric,

I register the callback like this :
--------------------------------------------------------------------
    var protocol, vector_layer;
    protocol = new OpenLayers.Protocol.HTTP( {
                url : 'stream.json',
                format: new OpenLayers.Format.GeoJSON(),
                callback : jsonreturn,
                params : {
                    id: 1
                }
        });

      vector_layer = new OpenLayers.Layer.Vector('Points', {
            styleMap    : styleMap,            
            strategies  : [
                //new OpenLayers.Strategy.Fixed(),
                new OpenLayers.Strategy.Cluster()
            ],
            protocol: protocol
       }); 
      protocol.read();
--------------------------------------------------------------------

So, with the previous code, if I uncomment the Fixed strategy (and
comment the protocol.read() line), the "jsonreturn" callback function is
never called. When the fixed strategy is commented, everything runs
fine.

Didrik

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to