[OpenLayers-Users] tiling features to speed detecting features
on the client
Paul Spencer
pagameba at gmail.com
Wed Apr 16 07:00:05 EDT 2008
Hi Graham,
There is an implementation of something similar to this in the WFS
Tile code, and there is also substantial new work being undertaken by
Tim Schaub to introduce Vector Behaviours which will be a much more
sophisticated way of managing this.
http://trac.openlayers.org/wiki/Proposal/VectorBehavior
Cheers
Paul
On 16-Apr-08, at 6:38 AM, Graham Carlyle wrote:
> In a previous post I said that I wanted to detect which feature a
> mouse
> had clicked on at the client side in order to be more responsive. The
> suggested solution worked well, that of downloading a geojson
> representation of the features up front and using the 2.6 OL feature
> of
> detecting whether the feature's geometry intersected with the mouse
> point.
>
> However for large maps, downloading the features in geojson (or
> another
> format) of the required detail for all zoom levels for detecting which
> feature is being clicked on is prohibitively large.
>
> So this got me thinking, how about tiling the feature information, or
> rather the geometry associated with it?
>
> On the server side I can see a way of hacking TileCache to generate a
> geojson feature "tile" by clipping the feature geometry to the tile
> bounds and then quantising the geometry by the tile resolution (using
> some shapely, worldmill & geojson sauce).
>
> On the client side a new type of OpenLayers Layer would download these
> feature "tiles" in parallel with the image tiles and provide access to
> the "visible" features for mouse click detection etc.
>
> I don't need to do this but I guess you could also render these
> "tiled"
> features and possibly get around some of the browser problems of
> rendering vector layers with too many vectors or vertices because of
> the
> geometry simplification of the tiling & quantisation.
>
> Is this madness? Am I missing something that exists already that would
> achieve what i want.
>
> thanks,
> Graham
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
More information about the Users
mailing list