Google Maps Parallel Lines demo

Here is a parallel polyline demo. I think parallel lines like this will be good for showing a route as they don't cover up the middle of the road etc. Constructor is as for GPolyline + 1 extra parameter specifying the gap between the lines in pixels. Recalculation is only done on a change of map zoom level.

On the test map below, GPolyline is used to mark the centre of the gap. Click on the map to draw a new parallel polyline and try out all types of corners.

Source code (free for any use) for the Parallel Line Overlay is here.


Bill Chadwick March 2008.