I am trying to draw a geodesic polyline with Google Maps JavaScript API from two address points.
var polyOptions = {geodesic:true}; var pol
You may want to check out the following example. First it tries to geocode address1. If it succeeds, it tries to geocode address2. If both succeed, it plots the geodesic polyline between the two coordinates, and two markers:
address1
address2
Google Maps API Geocoding Demo
Screenshot: