[OpenLayers-Users] http protocol problem
Eric Lemoine
eric.c2c at gmail.com
Sun Nov 9 14:16:07 EST 2008
Ok I see the problem now. You could also possibly register a one-time
featuresadded listener, by having the listener unregister itself the
first time a featuresadded event is received. Eric
2008/11/9, Didrik Pinte <lists at dipole-consulting.com>:
> 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.
>
>
More information about the Users
mailing list