Hi,

This should work:

if(...){
  avonZonyPrijem_layer.styleMap = styleAvonZonyPrijem;
  avonZonyPrijem_layer.redraw();
}
else if(...){
  avonZonyPrijem_layer.styleMap = styleAvonZonyPopulace;
  avonZonyPrijem_layer.redraw();
}
else if(...){
  avonZonyPrijem_layer.styleMap = styleAvonZonyLady;
  avonZonyPrijem_layer.redraw();
}

paste
avonZonyPrijem_layer.styleMap = styleAvonZonyPopulace;
avonZonyPrijem_layer.redraw();
into the firebug console and execute. 

Tested with firebug for http://vrbikdan.xf.cz/avon/avon.html

Arnd
 

-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von vrbikdan
Gesendet: Montag, 5. März 2012 16:10
An: [email protected]
Betreff: [OpenLayers-Users] Re: changing style of layer using radiobutton

Hi,
I change a little bit a code, but it isn't still ok. Now I remove whole
avonZony_layer and then I create new one with changes in rules in one
function tematika(). But in fact it isn't really correct and it take a time.
Can you anyone help me, how I can redraw only style of vector layer? 

Thanks a lot,
Dan

--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/changing-style-of-layer-using-radiobutto
n-tp4507241p4548024.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

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

Reply via email to