Hi list, I'm not having a profound understanding about the API yet, so
this might be only a minor mistake that drive me ... Argh. I'm trying
to replace the Gdirections polyline by a custom one with different
color and weight. So far this code is doing very well.

poly = gdirs.getPolyline();
 for (var i=0; i<poly.getVertexCount(); i++) {
       polypoints.push(poly.getVertex(i));
 }

 map.addOverlay(new GPolyline(polypoints, "#000000",3,1));

The problem is that I'm not able to remove this overlay using

poly = gdirs.getPolyline();
 for (var i=0; i<poly.getVertexCount(); i++) {
       polypoints.push(poly.getVertex(i));
 }

 map.removeOverlay(new GPolyline(polypoints, "#000000",3,1));

Did I get something wrong? Every help is highly appreciated!
Thanks, h...@nnes

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to