[OpenLayers-Dev] WFS Layer loadstart/loadend events missing in moveTo()

Erik Uzureau erik.uzureau at metacarta.com
Wed Oct 3 16:14:24 EDT 2007


This has been fixed and will be included in the release.
Thanks Roald for the bug report!
Erik

On 10/1/07, Roald de Wit <rdewit at users.sourceforge.net> wrote:
> Hi List,
>
> Maybe I'm overlooking something, but it seems that in the method
> moveTo() the following monotoring hook is missing after line 259 in
> Layer/WFS.js (SVN trunk: revision 4744)
>
>                         this.addTileMonitoringHooks(this.tile);
>
> A current tile is destroyed and a new tile is created, but not getting
> the monitoring hooks before being drawn. This results in the
> loadstart/loadend events not being triggered.
>
> It seems that the code there is a bit double anyway. Wouldn't something
> like this be a cleaner?
>
>
>             // Destroy tile first if exists
>             if (this.tile) {
>                 if (this.vectorMode) {
>                     this.destroyFeatures();
>                     this.renderer.clear();
>                 } else {
>                     this.clearMarkers();
>                 }
>                 this.removeTileMonitoringHooks(this.tile);
>                 this.tile.destroy();
>             }
>
>             //(re)create tile
>             this.tile = null; // do we need to do this??
>             this.tile = new OpenLayers.Tile.WFS(this, pos, tileBounds,
>                                                  url, tileSize);
>             this.addTileMonitoringHooks(this.tile);
>             this.tile.draw();
>
> Can this be fixed in the 2.5 release?
>
> Greetings, Roald
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>



More information about the Dev mailing list