<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>thanks a lot.</DIV>
<DIV>solved already by myself.</DIV>
<DIV><BR> var num = map.getNumLayers();<BR> for (var j=1; j<num; j++) {<BR> map.removeLayer( map.layers[1] );<BR> } </DIV>
<DIV><BR>>>> Christopher Schmidt <crschmidt@metacarta.com> 10/18/07 1:33 >>><BR>On Thu, Oct 18, 2007 at 10:51:50AM +0200, Armin W??spy wrote:<BR>> hi list,<BR>> is there a function which removes all displayed layers?<BR><BR>for (var i = map.layers.length - 1; i >= 0; i--) {<BR> map.removeLayer(map.layers[i]);<BR>} <BR><BR>Regards,<BR>-- <BR>Christopher Schmidt<BR>MetaCarta<BR></DIV></BODY></HTML>