-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
135 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
import { AddressComponent } from "./addressComponent"; | ||
import { Geometry } from "./geometry"; | ||
import { Photo } from "./photo"; | ||
import { OpeningHours } from "./openingHours"; | ||
import { PlaceReview } from "./placeReview"; | ||
|
||
export class Address { | ||
address_components: AddressComponent[]; | ||
adr_address: string; | ||
formatted_address: string; | ||
formatted_phone_number: string; | ||
geometry: Geometry; | ||
html_attributions: string[]; | ||
icon: string; | ||
id: string; | ||
international_phone_number: string; | ||
name: string; | ||
opening_hours: OpeningHours; | ||
permanently_closed: boolean; | ||
photos: Photo[]; | ||
place_id: string; | ||
reference: string; | ||
scope: string; | ||
price_level: number; | ||
rating: number; | ||
reviews: PlaceReview[]; | ||
types: string[]; | ||
url: string; | ||
utc_offset: number; | ||
vicinity: string; | ||
html_attributions: any[]; | ||
|
||
website: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { Viewport } from "./viewport"; | ||
import { Location } from "./location"; | ||
import { LatLngBounds } from "./latLngBounds"; | ||
import { LatLng } from "./latLng"; | ||
|
||
export interface Geometry { | ||
location: Location; | ||
viewport: Viewport; | ||
location: LatLng; | ||
viewport: LatLngBounds; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export interface LatLng { | ||
/** Comparison function. */ | ||
equals(other: LatLng): boolean; | ||
/** Returns the latitude in degrees. */ | ||
lat(): number; | ||
/** Returns the longitude in degrees. */ | ||
lng(): number; | ||
/** Converts to string representation. */ | ||
toString(): string; | ||
/** Returns a string of the form "lat,lng". We round the lat/lng values to 6 decimal places by default. */ | ||
toUrlValue(precision?: number): string; | ||
/** Converts to JSON representation. This function is intended to be used via JSON.stringify. */ | ||
toJSON(): LatLngLiteral; | ||
} | ||
export type LatLngLiteral = { lat: number; lng: number } | ||
export type LatLngBoundsLiteral = { east: number; north: number; south: number; west: number } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* A LatLngBounds instance represents a rectangle in geographical coordinates, including one | ||
* that crosses the 180 degrees longitudinal meridian. | ||
*/ | ||
import { LatLng, LatLngBoundsLiteral, LatLngLiteral } from "./latLng"; | ||
|
||
export interface LatLngBounds { | ||
/** Returns true if the given lat/lng is in this bounds. */ | ||
contains(latLng: LatLng | LatLngLiteral): boolean; | ||
|
||
/** Returns true if this bounds approximately equals the given bounds. */ | ||
equals(other: LatLngBounds | LatLngBoundsLiteral): boolean; | ||
|
||
/** Extends this bounds to contain the given point. */ | ||
extend(point: LatLng | LatLngLiteral): LatLngBounds; | ||
|
||
/** Computes the center of this LatLngBounds */ | ||
getCenter(): LatLng; | ||
|
||
/** Returns the north-east corner of this bounds. */ | ||
getNorthEast(): LatLng; | ||
|
||
/** Returns the south-west corner of this bounds. */ | ||
getSouthWest(): LatLng; | ||
|
||
/** Returns true if this bounds shares any points with the other bounds. */ | ||
intersects(other: LatLngBounds | LatLngBoundsLiteral): boolean; | ||
|
||
/** Returns if the bounds are empty. */ | ||
isEmpty(): boolean; | ||
|
||
/** Converts to JSON representation. This function is intended to be used via JSON.stringify. */ | ||
toJSON(): LatLngBoundsLiteral; | ||
|
||
/** Converts the given map bounds to a lat/lng span. */ | ||
toSpan(): LatLng; | ||
|
||
/** Converts to string. */ | ||
toString(): string; | ||
|
||
/** | ||
* Returns a string of the form "lat_lo,lng_lo,lat_hi,lng_hi" for this bounds, where "lo" corresponds to the | ||
* southwest corner of the bounding box, while "hi" corresponds to the northeast corner of that box. | ||
*/ | ||
toUrlValue(precision?: number): string; | ||
|
||
/** Extends this bounds to contain the union of this and the given bounds. */ | ||
union(other: LatLngBounds | LatLngBoundsLiteral): LatLngBounds; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export interface OpeningHours { | ||
open_now: boolean; | ||
periods: OpeningPeriod[]; | ||
weekday_text: string[]; | ||
} | ||
|
||
export interface OpeningPeriod { | ||
open: OpeningHoursTime; | ||
close?: OpeningHoursTime; | ||
} | ||
|
||
export interface OpeningHoursTime { | ||
day: number; | ||
hours: number; | ||
minutes: number; | ||
nextDate: number; | ||
time: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface Photo { | ||
height: number; | ||
html_attributions: string[]; | ||
width: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export interface PlaceReview { | ||
aspects: PlaceAspectRating[]; | ||
author_name: string; | ||
author_url: string; | ||
language: string; | ||
text: string; | ||
} | ||
|
||
export interface PlaceAspectRating { | ||
rating: number; | ||
type: string; | ||
} |
This file was deleted.
Oops, something went wrong.