After a night slogging, i found my solution;
I'd like to share my solution and any suggetion is appreciated.
I've created a function to add the (KML)  vector layer;

Also added the function to the 'onClick' event of the button;

The hardest part was to find the right way to remove an existing layer.
Tried several examples but this one works well.





--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Problem-dynamic-loading-a-KML-file-refresh-tp5015133p5015310.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

Reply via email to