<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid">
<DIV class=plainMail>Dear list,</DIV>
<DIV class=plainMail>Every time a user choose a location from drop down list, a marker will be constructed on the WMS map by a function </DIV>
<DIV class=plainMail>(see snippet below). <BR>To avoid being crowded, how to erase markers created&nbsp; by previous users, before a new user choose a new location?</DIV>
<DIV class=plainMail>Any hints would be appreciated. </DIV>
<DIV class=plainMail>&nbsp;</DIV>
<DIV class=plainMail>thank you&nbsp; </DIV>
<DIV class=plainMail>&nbsp;</DIV>
<DIV class=plainMail>kind regards,<BR>surya</DIV>
<DIV class=plainMail>---------------------------------------</DIV>
<DIV class=plainMail>function go(){</DIV>
<DIV class=plainMail>.....</DIV>
<DIV class=plainMail>var&nbsp;lonlat&nbsp;=&nbsp;document.getElementById('lonlat').options[document.getElementById('lonlat').selectedIndex].value;<BR>var&nbsp;longitude&nbsp;=&nbsp;lonlat.substring(0,lonlat.indexOf(','));<BR>var&nbsp;latitude&nbsp;=&nbsp;lonlat.substring(lonlat.indexOf(',')+1,lonlat.length);<BR>map.setCenter(new&nbsp;OpenLayers.LonLat(longitude,latitude),6); </DIV>
<DIV class=plainMail>var markers = new OpenLayers.Layer.Markers ("Markers", {'calculateInRange': function() { return true; }});<BR>var size = new OpenLayers.Size (21, 25); <BR>var offset = new OpenLayers.Pixel (-(size..w/2), -size.h); <BR>var icon1 = new OpenLayers.Icon ('http://localhost:8080/geoserver/openlayers/img/marker-gold.png', size, offset); <BR>m1 = new OpenLayers.Marker (new OpenLayers.LonLat (longitude,latitude), icon1); <BR>m1.setOpacity (1); <BR>markers.addMarker (m1); </DIV>
<DIV class=plainMail>}<BR>--------------------------------------</DIV></BLOCKQUOTE></td></tr></table><br>