[OpenLayers-Users] Making a change of style permanent

Christopher Schmidt crschmidt at metacarta.com
Fri Apr 6 13:43:12 EDT 2007


On Fri, Apr 06, 2007 at 10:15:15AM -0600, Tim Schaub wrote:
> Hey-
> 
> Nick Whitelegg wrote:
> > // Redraw selected feature in new colour
> > vectorLayer.redrawFeature(selectedFeature,style);
> 
> Watch ticket #628 [1].
> 
> If this patch is accepted, layer.redrawFeature() will be changed to 
> layer.drawFeature().
> 
> I'm going to have a tantrum if layer.redrawFeature() makes it in to 2.4. 
>   (Since the renderer decides whether to draw or redraw based on the 
> feature that you pass it).

It shouldn't make it in. In most cases, using *pre*FeatureInsert is the
better way to go -- setting the style there will make it rendered right,
and skips the render-setstyle-render that is currently happening.

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list