title: Draw a path with Marking solid and dotted line on map
body: <p>As per documentation on maps API v3, there are two separate example of dotted and solid line.. i have an array of lat and long, i want to mark path alternate marking of solid and dotted between cordinates..
   code is as </p>
  
  <pre><code>    var lat_lng = new Array();
      var latlngbounds = new google.maps.LatLngBounds();
      for (var i = 0; i &lt; markers.length; i++) {
          var data = markers[i];
          var myLatlng = new google.maps.LatLng(data.lat, data.lng);
          lat_lng.push(myLatlng);
        var marker = new google.maps.Marker({
              position: myLatlng,
              map: map,
              title: data.title
          });
        //  console.log(i%2);
  
          var lineSymbol = {
                path: 'M 0,-1 0,1',
                strokeOpacity: 1,
                scale: 4
              };
  
  
  
          latlngbounds.extend(marker.position);
          (function (marker, data) {
              google.maps.event.addListener(marker, "click", function (e) {
                  infoWindow.setContent("Location:"+data.location_name+"&lt;br&gt; Battery Status :"+data.battery_status+"&lt;br&gt; Form :"+data.tablename+"&lt;br&gt; Status :"+data.status+"&lt;br&gt; Time :"+new Date(data.time)+"&lt;br&gt; Weather :"+data.weather);
                  infoWindow.open(map, marker);
              });
          })(marker, data);
      }
      map.setCenter(latlngbounds.getCenter());
      map.fitBounds(latlngbounds);
      //***********ROUTING****************//
      //Initialize the Path Array
      var path = new google.maps.MVCArray();
      //Initialize the Direction Service
      var service = new google.maps.DirectionsService();
  
      //Set the Path Stroke Color
      if(i%2==0)
    {
          var poly = new google.maps.Polyline({ map: map, strokeColor: '#4986E7',strokeOpacity: 0,
                icons: [{
                  icon: lineSymbol,
                  offset: '0',
                  repeat: '20px'
                }], });   
    }
  else
    {
      var poly = new google.maps.Polyline({ map: map, strokeColor: '#4986E7'});
  
    }
  </code></pre>
  
  <p>I am drawing line at the end with a case but it only take one either solid or dotted at a time.</p>