From 4f0c326e4553fc4b96d9560717e28473817699bb Mon Sep 17 00:00:00 2001 From: Vinh Tran Date: Thu, 3 Dec 2015 14:35:42 -0500 Subject: [PATCH 1/3] Update search request optional fields Update PlaceSearchRequest, RadarSearchRequest, and TextSearchRequest interfaces to better reflect their optional fields. Reference: https://developers.google.com/maps/documentation/javascript/places --- googlemaps/google.maps.d.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index 3ac35b048..770151f33 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -1917,16 +1917,16 @@ declare module google.maps { } export interface PlaceSearchRequest { - bounds: LatLngBounds; - keyword: string; - location: LatLng|LatLngLiteral; + bounds?: LatLngBounds; + keyword?: string; + location?: LatLng|LatLngLiteral; maxPriceLevel?: number; minPriceLevel?: number; - name: string; - openNow: boolean; - radius: number; - rankBy: RankBy; - types: string[]; + name?: string; + openNow?: boolean; + radius?: number; + rankBy?: RankBy; + types?: string[]; } export class PlacesService { @@ -1963,11 +1963,11 @@ declare module google.maps { export interface RadarSearchRequest { bounds?: LatLngBounds; - keyword: string; - location: LatLng|LatLngLiteral; - name: string; - radius: number; - types: string[]; + keyword?: string; + location?: LatLng|LatLngLiteral; + name?: string; + radius?: number; + types?: string[]; } export enum RankBy { @@ -1988,10 +1988,10 @@ declare module google.maps { export interface TextSearchRequest { bounds?: LatLngBounds; - location: LatLng|LatLngLiteral; + location?: LatLng|LatLngLiteral; query: string; - radius: number; - types: string[]; + radius?: number; + types?: string[]; } } From d4c62f32974272b0133a2b45fd1b1585a2531b71 Mon Sep 17 00:00:00 2001 From: Vinh Tran Date: Sat, 5 Dec 2015 15:15:10 -0500 Subject: [PATCH 2/3] Update interface DirectionRequest Added ```LatLngLiteral``` as an option type for ```origin``` and ```destination``` fields for DirectionRequest. Reference: [https://developers.google.com/maps/documentation/javascript/reference#Place](https://developers.google.com/maps/documentation/javascript/reference#Place) --- googlemaps/google.maps.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index 770151f33..87b10991e 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -911,10 +911,10 @@ declare module google.maps { avoidFerries?: boolean; avoidHighways?: boolean; avoidTolls?: boolean; - destination?: LatLng|string; + destination?: LatLng|LatLngLiteral|string; durationInTraffic?: boolean; optimizeWaypoints?: boolean; - origin?: LatLng|string; + origin?: LatLng|LatLngLiteral|string; provideRouteAlternatives?: boolean; region?: string; transitOptions?: TransitOptions; From 4f1c2d48e09fb33d65c7b4241ba09453f1ce7820 Mon Sep 17 00:00:00 2001 From: Vinh Tran Date: Sat, 5 Dec 2015 15:52:10 -0500 Subject: [PATCH 3/3] Update DirectionsWaypoint's location field optional types --- googlemaps/google.maps.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemaps/google.maps.d.ts b/googlemaps/google.maps.d.ts index 87b10991e..699115473 100644 --- a/googlemaps/google.maps.d.ts +++ b/googlemaps/google.maps.d.ts @@ -959,7 +959,7 @@ declare module google.maps { export interface TransitFare { } export interface DirectionsWaypoint { - location: LatLng|string; + location: LatLng|LatLngLiteral|string; stopover: boolean; }