ericnewton76 / gmaps-api-net

C# google maps api interface for interacting with the backend web services for Google Maps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mismatch in Geocoding Response status codes

andrzejkaszkowiak opened this issue · comments

So, Google documented status codes for geocoding response is different than than ones provided by the library. Is there a mismatch, or google has an outdated documentation?

source code:

public enum ServiceResponseStatus
{
Unknown = 0,
/// <summary>
/// Indicates that no errors occurred; the address was successfully
/// parsed and at least one geocode was returned.
/// </summary>
Ok = -1,
/// <summary>
/// Indicating the service request was malformed.
/// </summary>
InvalidRequest = 1,
/// <summary>
/// Indicates that the geocode was successful but returned no results.
/// This may occur if the geocode was passed a non-existent address or
/// a latlng in a remote location.
/// </summary>
ZeroResults = 2,
/// <summary>
/// Indicates that you are over your quota.
/// </summary>
OverQueryLimit = 3,
/// <summary>
/// Indicates that your request was denied.
/// </summary>
RequestDenied = 4,
/// <summary>
/// At least one of the provided locations in the request could not
/// be geocoded.
/// </summary>
NotFound = 5,
/// <summary>
/// Indicates that too many waypoints were provided in the request.
/// Without an API key the maximum number is 8.
/// </summary>
MaxWaypointsExceeded = 6
}

from google docs:

    "OK" indicates that no errors occurred; the address was successfully parsed and at least one geocode was returned.
    "ZERO_RESULTS" indicates that the geocode was successful but returned no results. This may occur if the geocoder was passed a non-existent address.
    "OVER_QUERY_LIMIT" indicates that you are over your quota.
    "REQUEST_DENIED" indicates that your request was denied.
    "INVALID_REQUEST" generally indicates that the query (address, components or latlng) is missing.
    "UNKNOWN_ERROR" indicates that the request could not be processed due to a server error. The request may succeed if you try again.
    "ERROR" indicates that the request timed out or there was a problem contacting the Google servers. The request may succeed if you try again.

source: https://developers.google.com/maps/documentation/javascript/geocoding#GeocodingStatusCodes