001    package com.google.gwt.maps.client.services;
002    
003    /**
004     * The status returned by the DirectionsService on the completion of a call to route().
005     * <br><br>
006     * See <a href="https://developers.google.com/maps/documentation/javascript/reference#DirectionsStatus">DirectionsStatus API Doc</a>
007     */
008    public enum DirectionsStatus {
009    
010      /**
011       * The DirectionsRequest provided was invalid.
012       */
013      INVALID_REQUEST,
014      
015      /**
016       * Too many DirectionsWaypoints were provided in the DirectionsRequest. The total allowed waypoints is 8, plus the origin and destination.
017       */
018      MAX_WAYPOINTS_EXCEEDED,
019      
020      /**
021       * At least one of the origin, destination, or waypoints could not be geocoded.
022       */
023      NOT_FOUND,
024      
025      /**
026       * The response contains a valid DirectionsResult. 
027       */
028      OK,
029      
030      /**
031       * The webpage has gone over the requests limit in too short a period of time.
032       */
033      OVER_QUERY_LIMIT,
034      
035      /**
036       * The webpage is not allowed to use the directions service.
037       */
038      REQUEST_DENIED,
039      
040      /**
041       * A directions request could not be processed due to a server error. The request may succeed if you try again.
042       */
043      UNKNOWN_ERROR,
044      
045      /**
046       * No route could be found between the origin and destination.
047       */
048      ZERO_RESULTS; 
049      
050      public String value() {
051        return name().toLowerCase();
052      }
053      
054      public static DirectionsStatus fromValue(String type) {
055        return valueOf(type.toUpperCase());
056      }
057    
058      public String toString() {
059        return name();
060      }
061    }