[OpenLayers-Users] Feature layer: toggle feature visibility
Christopher Schmidt
crschmidt at metacarta.com
Wed Oct 3 09:21:39 EDT 2007
On Wed, Oct 03, 2007 at 02:21:49PM +0200, Nils B. Weidmann wrote:
> Hi there,
>
> I am developing an animation of spatio-temporal data. Is there a way to
> toggle feature visibility in a Vector layer efficiently? At the moment I
> set the opacity style attribute for the features to be shown/hidden, and
> redraw() the layer. However, this procedure is very slow. Is there a way
> to make it faster?
There is a drawFeature method on the Layer.Vector class. If it is passed
a feature which is already drawn on the renderer, the renderer will
redraw just that feature.
This method is currently not marked as stable -- this means that it
could change in a point release. If this solves your problem, I suggest
you create a ticket for marking drawFeature as stable functionality, so
we don't break it on you in the future.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list