[OpenLayers-Users] drawing style

Tim Schaub tschaub at opengeo.org
Wed Feb 25 14:32:03 EST 2009


Hey-

So, we've long defined a "temporary" style for vector features.  This is 
a symbolizer that is used to create an OpenLayers.Style object keyed by 
the "temporary" rendering intent in the default StyleMap given to all 
vector layers.

http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Feature/Vector.js#L378

This is a symbolizer that was put together without much thought.  It is 
a garish yellow line, 4 pixels wide.  Nobody probably saw it used before.

I just put in a change that passes the style associated with the 
temporary rendering intent to the sketch handlers.  The effect is that 
this default symbolizer is now used when drawing new sketches.

So, if you didn't explicitly change your temporary feature style before, 
you used to get the partially transparent orange.  Now you get thick 
yellow strokes.

This makes things a bit uglier by default (in my opinion).  We've got a 
couple options:

1) Make the temporary style the same as the default style.  This would 
give people what they had before (partially transparent orange sketches).

2) Make the temporary style something else.  This would change the look 
of applications where people were using the defaults.  (And we could 
post some options and for people to weigh in on.)

Any opinions?

Tim

See the temporary yellow style here:
http://openlayers.org/dev/examples/select-feature.html


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.



More information about the Users mailing list