Purple lines are polylines which are stored as an array under DOM.You can send their information into your server.
In this page,there is a javascript event triggers after you clicked on map as follows:
var firstpoint = true;
var gmarkers = [];
var gpolys = [];
var dist = 0;
GEvent.addListener(dirn,"load", function() {
// snap to last vertex in the polyline
var n = dirn.getPolyline().getVertexCount();
var p=dirn.getPolyline().getVertex(n-1);
var marker=new GMarker(p);
map.addOverlay(marker);
// store the details
gmarkers.push(marker);
if (!firstpoint) {
map.addOverlay(dirn.getPolyline());
gpolys.push(dirn.getPolyline());
dist += dirn.getPolyline().Distance();
document.getElementById("distance").innerHTML="Path length: "+(dist/1000).toFixed(2)+" km. "+(dist/1609.344).toFixed(2)+" miles.";
}
firstpoint = false;
});
These lines of code say that,after you clicked on map,the point you clicked snapped to nearest road,then if you add a second point to another point,a blue route appears as between all those polylines.
As I said previously,those polylines are stored in gpolys array.Also know that all vertices or GMarkers are also stored in gmarkers array.
Hope this helps
Myra