Google Maps directions V3: Multiple directions on a map
问题 I am trying to render multiple directions(well, their Polylines, essentially) on a single instance of a map. In the prior version of the maps API, I did something like //directions[] stores the GDirections objects //x[] is an array of Elements extracted from an XMLHTTPResponse object //iterating over the values in x[] GEvent.addListener(directions[i], "load", function() { var polyline = this.getPolyline(); map.addOverlay(polyline); polyline.setStrokeStyle({opacity:0.2}) }); directions[i].load