[OpenLayers-Users] http protocol problem

Didrik Pinte lists at dipole-consulting.com
Sun Nov 9 10:57:41 EST 2008


On Sun, 2008-11-09 at 09:07 +0100, Eric Lemoine wrote:
> Hi. What do you mean by "refresh"? What is the problem you're having
> exactly? Eric

Hi Eric,

What I wanted to do :

I wanted to auto-load a geojson stream using a Cluster strategy and a
Protocol.HTTP in the layer definition AND have the map being recentered
on the data when loaded.

Here is the problem :

To do that, I have to use a callback to recenter the map after the data
has been loaded. Because the Cluster strategy did not load the data, I
had to use a Fixed strategy. First problem, the Fixed strategy oveloads
the callback definition of the Protocol, thus I need another way to call
my callback. Using the "featuresadded" is not possible because the
callback is called by the Cluster strategy at each refresh of the layer
to recreate the clusters (zoom in, zoom out).

Workaround :

Not using the Fixed stragey and calling protocol.read() make it work.

-------------- 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/20081109/854a88a1/attachment.bin


More information about the Users mailing list