AW: [OpenLayers-Users] Re: changing style of layer usingradiobutton
Arnd Wippermann
arnd.wippermann at web.de
Tue Mar 6 12:39:21 EST 2012
Hi,
the solution should be the same.
Load your layer to the map and afterwards
redefine your styleMap, assign it to the layer and redraw the layer.
function init()
{
...
avonPsc_layer = new OpenLayers.Layer.Vector("KML", {....
}
function changeByRadiobutton()
{
if(0){
styleAvonPsc = ...;
}
else if(1){
styleAvonPsc = ...;
}
...
avonPsc_layer.styleMap = styleAvonPsc;
avonPsc_layer.redraw();
}
Arnd
-----Ursprüngliche Nachricht-----
Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von vrbikdan
Gesendet: Dienstag, 6. März 2012 08:10
An: openlayers-users at lists.osgeo.org
Betreff: Re: AW: [OpenLayers-Users] Re: changing style of layer
usingradiobutton
Hi,
thanks a lot but I'm really fool. I forgot to write url with new code. Code,
what you refer on vrbikdan.xf.cz/avon/avon.html has one big problem, there
are layers and styles for every situation so if I wanted to give user
posibility of changing borders of rules or anything else, I had to create so
many layers and styles. So my idea was to write a few variables pasted into
rules and change them. Here is code I need to help with:
http://vrbikdan.xf.cz/avon/avon2.htm vrbikdan.xf.cz/avon/avon2.html . I
should wrote it yesterday, sorry :(
Dan
--
View this message in context:
http://osgeo-org.1560.n6.nabble.com/changing-style-of-layer-using-radiobutto
n-tp4507241p4550390.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list