[OpenLayers-Users] http protocol problem
Didrik Pinte
lists at dipole-consulting.com
Thu Nov 6 02:45:05 EST 2008
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081106/d581413b/attachment.bin
More information about the Users
mailing list