[OpenLayers-Users] Making a change of style permanent
Christopher Schmidt
crschmidt at metacarta.com
Thu Apr 5 23:37:41 EDT 2007
On Thu, Apr 05, 2007 at 11:49:28PM +0100, Nick Whitelegg wrote:
> For example if you go to http://www.free-map.org.uk/vector/, choose the
> "select" button, click on a green line, choose the "change" button and type
> in "bridleway", it will change from green to brown, but then, when you select
> another line, it will go back to the original green.
Your code says:
vectorLayer.ways[selectedFeature].style=style;
What you actually mean is:
selectedFeature.style = style;
I don't see anywhere you actually set this in code. Setting it via the
select tools does seem to keep it appropriately, so I don't think this
is an issue with the OpenLayers code -- just change that one line of
code, and you should be set, I think.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list