> return selectedColor;
> vector.redraw();
You can't return AND then execute some more code.
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Help-with-changing-the-color
Oh I forgot, kamap is the base layer and color selection is called in HTML
part.
purple
blue
yellow
red
orange
green
--
View thi
I fumbled with the controls for a while and then managed to do it the way you
proposed, adding the vector.redraw() made it work. But now, when it draws
the polygons with the colors I select, now I can't draw polygons -the ones
without specifying the number of sides-, lines and points. I can only d
I suppose going into the jQuery might turn things around. I'll see if I can
do it that way. Again many thanks :)
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/Help-with-changing-the-color-of-drawn-features-tp5328663p5328793.html
Sent from the OpenLayers Users mailing li
But what if the HTML sets it user-defined color, without caring about
OpenLayers, and instead is OL itself going to read the color in the HTML
div?
I mean, from the function inside the context of the style, you read the
color. ?
With JQuery for example you can do it simply.
I just don't know i
Hello Piero, many thanks for your reply. I implemented the code you gave me
-only applied the styles so far, leaving the strategy for the defaults-
however, the HTML part can't reach the function since it is wrenched in the
init() part that sets up the map. And when I move the vector and the styli
Hi Koveras, have you tried:
var myFeatures = new OpenLayers.Layer.Vector("myVectors", {
styleMap: myStyleMap,
strategies: [myStrategy],
protocol: etc.
}
Then:
var myStyleMap = new OpenLayers.StyleMap({
Hello everyone, I am currently teaching myself OpenLayers and managed to draw
Polygons, dots and lines so far. -Along with styling- What I have a hard
time figuring out is, is there a way to select the color we want to draw
these figures in ? I mean, I have set an HTML Option menu that has some
co