Hi,

To change only some properties without repeating all others you can use

polygonFeature.style = new OpenLayers.Util.applyDefaults({pointRadius:20},
polygonFeature.style); 

Arnd



-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im
Auftrag von ulao
Gesendet: Montag, 19. Juli 2010 18:00
An: [email protected]
Betreff: [OpenLayers-Users] change only one attribute in style?


ok This does not make sense to me, and I hope its just me and not by
design...

I do somthing like this
                        polygonFeature.style = {
                    pointRadius: "${type}", // sized according to type
attribute
                    fillColor: "#0000ff",
                    strokeColor: "#ff9933",
                    strokeWidth: 2,
                    graphicZIndex: 1
            };

and I can sent my color . but Doing this.

                        polygonFeature.style = {
                    pointRadius: "${type}", // sized according to type
attribute
                    fillColor: "#0000ff",
//strokeColor: "#ff9933",
                    strokeWidth: 2,
                    graphicZIndex: 1
            };

will set the stroke to black. So its like I have to set all attributes each
time. Is there a way to just set one attribute, am I miss-using this?




--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/change-only-one-attribute-in-style-tp
5312670p5312670.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to