[OpenLayers-Users] How to access style properties of features?

Peter.Sykora at ooe.gv.at Peter.Sykora at ooe.gv.at
Mon Dec 21 07:02:02 EST 2009


Hi Andreas,

>
>Try feature.style.graphicWidth instead of 
>feature.Vector.style.graphicWidth.

I tried that, and several other things as well but I didn´t get any results so far.

Just to be sure that the problem is not the code of the rest of my project I added the following line

alert (features[0].style.graphicWidth);

to the styleMap Example (http://www.openlayers.org/dev/examples/stylemap.html)
Again, features[0].style is null.

I just wonder why there is a "style" property in OpenLayers.Feature.Vector but not in OpenLayers.Feature

Cheers,
Peter



More information about the Users mailing list