Question: Migrating code from Javascript API 2 to 3. I have a list of locations which i need to plot in the form of a driving directions. This was done in v2 using the following code

```
directions = new GDirections(map);
directions.loadFromWaypoints(waypoints, {preserveViewport: true});  

```

Here is my attempt at converting this to V3

```
var request = {
    origin: startLoc,
    destination: endLoc,
    waypoints: waypoints,
    optimizeWaypoints: true,
    travelMode: google.maps.TravelMode.DRIVING
};          

directionsService.route(request, function(response, status) {
    if (status == google.maps.DirectionsStatus.OK) {
        directionsDisplay.setDirections(response);
    } 
});

```

Not the whole code, but the general idea. Seems to work fine, with one little issue. When there are more than 8 waypoints, the call fails. This is expected since [Google Maps API v3 Docs](https://developers.google.com/maps/documentation/javascript/directions#Waypoints) states 

> 
> The maximum allowed waypoints is 8, plus the origin, and destination. Maps API for Business customers are allowed 23 waypoints, plus the origin, and destination. Waypoints are not supported for transit directions.
> 
> 
> 

Since i didn't run in to this issue in v2, is this a new restriction with v3? I wonder if i am using something that was not designed for what i need. This is a very lightly used applicaton with 2 users, so i am not sure if an expensive business license is worth the return. Emails to Google maps team have not yet been returned. Any workarounds/pointers will be of great help. Thanks.

Answer: 
One possible work around (particularly for a lightly used site) is to use multiple DirectionsService requests.

* [example 1 (addresses)](http://www.geocodezip.com/v3_directions_multipleWayPts_CustomMrkrs_busRoute.html)
* [example 2 (coordinates)](http://www.geocodezip.com/v3_directions_multipleWayPts_CustomMrkrsB.html)
Use Should need to Use array concept like these...

```
directionsService[i].route({                                    
                    'origin': start,
                    'destination': end
                    'waypoints': waypts,
                    'travelMode': 'DRIVING'
                       },
                    function (directions, status){              
                                if (status == google.maps.DirectionsStatus.OK) {
                                    directionsDisplay[j].setDirections(directions);
                                }
                            });

```

in these directionservice and directiondisplay are should be in array logic
and using looping concepts use should need to assign start,end and waypoints dynamically and  

try sending multiple request means u ll get the route for n number of latlon's ...but the markers ll be repeat with same name after 8 waypoints for that we remove the default markers by using supressmarkers false property...