code: function init() {
    var myOptions = {
      zoom: 15,
      center: new google.maps.LatLng(35.23, -80.84),
      mapTypeId: google.maps.MapTypeId.ROADMAP,
      mapTypeControlOptions: {
        mapTypeIds: [google.maps.MapTypeId.ROADMAP]
      }
    }
    map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
    poly = new google.maps.Polygon({
      strokeWeight: 3,
      fillColor: '#5555FF'
    });
    poly.setMap(map);
    poly.setPaths(new google.maps.MVCArray([path]));
    
    google.maps.event.addListener(map, 'click', addPoint);
    svc = new gmaps.ags.GeometryService('http://sampleserver3.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer');
    iw = new google.maps.InfoWindow({
      maxWidth: 250,
      content: 'Draw polygon by:<ul><li>Click map to add a Vertex<li>Drag marker to adjust<li>Click marker to delete vertex</ul><!--center><button onclick="closeWin()">OK</button></center-->',
      position: map.getCenter()
    });
    iw.open(map);
  }
docs: If very complex geometry then it's a good idea to set up your proxy. gmaps.ags.Config.proxyUrl = '/proxy/proxy.ashx';