You can use Polylines and specify two or more points using gooogle.maps.LatLng. Here is the JSFiddle Demo :
//create points on the Polylines var flightPlanCoordinates = [ new google.maps.LatLng(37.772323, -122.214897), new google.maps.LatLng(-27.46758, 153.027892) ]; //create the Polyline and feed it points with stroke styling var flightPath = new google.maps.Polyline({ path: flightPlanCoordinates, strokeColor: "#FF0000", strokeOpacity: 1.0, strokeWeight: 2 }); //set the polylines on the map flightPath.setMap(map);
To be more detailed, as others have shown, coodains can either be entered by the user or by a click event to place markers as points on the map and then supply coodains markers as points for polylines, or you can also create a form in which users can manually enter your address or their lat lng as points for drawing points, but the detailed way to draw polylines is similar to the above example, except that Lat Lng are statically encoded on a demo.
source share