001 package com.google.gwt.maps.client.services; 002 003 /** 004 * The status returned by the Geocoder on the completion of a call to geocode(). 005 * <br><br> 006 * See <a href="https://developers.google.com/maps/documentation/javascript/reference#GeocoderStatus">GeocoderStatus API Doc</a> 007 */ 008 public enum GeocoderStatus { 009 010 /** 011 * There was a problem contacting the Google servers. 012 */ 013 ERROR, 014 015 /** 016 * This GeocoderRequest was invalid. 017 */ 018 INVALID_REQUEST, 019 020 /** 021 * The response contains a valid GeocoderResponse. 022 */ 023 OK, 024 025 /** 026 * The webpage has gone over the requests limit in too short a period of time. 027 */ 028 OVER_QUERY_LIMIT, 029 030 /** 031 * The webpage is not allowed to use the geocoder. 032 */ 033 REQUEST_DENIED, 034 035 /** 036 * A geocoding request could not be processed due to a server error. The request may succeed if you try again. 037 */ 038 UNKNOWN_ERROR, 039 040 /** 041 * No result was found for this GeocoderRequest. 042 */ 043 ZERO_RESULTS; 044 045 public String value() { 046 return name().toLowerCase(); 047 } 048 049 public static GeocoderStatus fromValue(String type) { 050 return valueOf(type.toUpperCase()); 051 } 052 053 public String toString() { 054 return name(); 055 } 056 }