[OpenLayers-Dev] Tiled WFS layer (need feedback)
tschaub at openplans.org
Tue Feb 12 10:47:55 EST 2008
Martijn van Oosterhout wrote:
> [Not for 2.6]. I've finally gotten around to doing tiled WFS "the
> right way" as some would put it. After some discussion on IRC it was
> decided the best way would be to have a new "singleTile: false" option
> to support the tiled mode. A couple of points which relate to
Sounds great. Is this available to take a look at somewhere?
> - Feature lifecycle management
> Currently the Tile.WFS fetches features and passes them to the layer
> and forgets about them. For tiled mode you can't really do this, since
> you need to know which features go away when a tile moves out of
> range. So in tiled mode the tile manage their own features, adding and
> removing from the layer as appropriate. What I would like to do is
> that even in singleTile mode the tile manages the features: this opens
> up the path of, when dragging/zooming in singleTile mode, a new tile
> is created and populated before deleting the old one, to avoid
> flickering (I beleive something similar is planned for TMS?).
I think it also makes sense to allow users to only remove features that
are outside the viewport - even in singleTile mode. This can be done
with an option to removeFeatures that checks bounds on features and only
ditches features with bounds that do not intersect the viewport bounds.
> This is a API change and I'd like to know what people think on this point.
> - Managing of duplication between WFS tiles
> One of the harder parts of tiled WFS is that a single feature can
> exist in multiple tiles. The way this is managed is by reference
> counting the features based on the fid of the feature. Anonymous
> features (fid==null) are assumed unique. I beleive this fits with most
> people's expectations. It does assume that server will always pass
> complete features and won't require the client to merge multiple
I think it makes sense to add an option to layer.addFeatures so only
unique features are added. I've done this by managing a "fids" property
on the vector layer, relying on that mapping to determine which features
are on a layer by fid. How did you handle this?
Thanks for working on this.
More information about the Dev