[OpenLayers-Users] Which OpenLayers.Feature.Vector.style is used while drawing?

Jeff Dege jdege at korterra.com
Fri Mar 30 12:22:53 EDT 2007


I'm trying to draw polygons in a different color than the default.  But
I've only managed to change the color of the drawn polygons.

Passing a style argument to the OpenLayers.Feature.Vector() constructor
results in a feature on the map with the colors from that style - when
that feature is on the map.  But it doesn't change the color of the
partial polygon that is being displayed while the polygon is in the
process of being drawn.  Once I finish the polygon, the color changes to
the color I have set.  But I've not been able to identify how to change
the colors that are used while the drawing is still in progress.

But I'm working on a problem that has two different editting modes, so
that the process of drawing a polygon can mean one of two very different
things.  I'd like to use color to cue the user as to which mode he is
in.  But that means changing the colors used while drawing, not just the
colors of the drawn polygons.

Vector.js includes three definitions for
OpenLayers.Feature.Vector.style, 'default', 'select', and 'temporary'.

I've tried changing these, to no effect.

Where should I be looking?



More information about the Users mailing list