Skip to content

Instantly share code, notes, and snippets.

@MightyPork
Created June 25, 2015 14:45
Show Gist options
  • Save MightyPork/d96371503224d76bbe4f to your computer and use it in GitHub Desktop.
Save MightyPork/d96371503224d76bbe4f to your computer and use it in GitHub Desktop.
geocode result
declare interface Location {
lat:number;
lng:number
}
declare interface GeocodeResult {
address_components: {
long_name: string;
short_nam: string;
types: string[];
}[];
formatted_address: string;
geometry: {
bounds:{
northeast: Location;
southwest: Location;
};
location: Location;
location_type: string;//enum?
viewport: {
northeast: Location;
southwest: Location;
};
};
place_id : string;
types :string[];
}
/** Response from the Google Geocode API */
declare interface GeocodeResponse {
status: string;
results?: GeocodeResult[];
}
/** Google timezone API response */
declare interface TzApiResponse {
status: string;
dstOffset?: number;
rawOffset?: number;
timeZoneId?: string;
timeZoneName?: string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment