<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=Windows-1252">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY>
<DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial size=2>Hi
All,</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial size=2>I have a app where i load
markers with polylines from a xml file</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial size=2>when i click a link i load a
new xml with the following function</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial size=2> function
loadXml(url){<BR> //Clear
markers<BR>
markers.clearMarkers();<BR> //Clear
PolyPoints<BR> pointList = [];<BR>
<BR>
OpenLayers.loadURL(url, null, null, loadSuccess,
loadFailure);<BR>
<BR> //add the marker
layer<BR>
map.addLayer(polys);<BR>
map.addLayer(markers);<BR> <BR>
}</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial size=2>the problem i am having is it
is clearing the old markers from the map but it is not clearing the
polyline</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial size=2>here is the code for the
poly</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial size=2>var polys = new
OpenLayers.Layer.Vector("polys");</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial size=2>if (addpoly ==
1){<BR>
newPoint = new
OpenLayers.Geometry.Point(lng,lat);<BR>
pointList.push(newPoint);<BR> var lineFeature =
new
OpenLayers.Feature.Vector(<BR>
new
OpenLayers.Geometry.LineString(pointList),null,poly_style);<BR>
polys.addFeatures([lineFeature]);<BR>
<BR>
} //end Polys</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial size=2>is there a way i can somehow
destroy / remove the old line?</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2>Thanks</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2>Kenny</FONT></SPAN></SPAN></DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN></SPAN> </DIV>
<DIV align=left><SPAN class=813051814-09072002><SPAN
class=495391014-10092008><FONT face=Arial
size=2></FONT></SPAN> </DIV></DIV></SPAN>
<DIV> </DIV>
</BODY></HTML>