Skip to content

Commit 44265dd

Browse files
willum070googlemaps-botwangela
authored
fix: adds locationrestriction param doc; updates location param doc (#363)
* fix: adds locationrestriction parameter; updates location parameter with note about radius parameter. * chore: remove modified dist from pull request Co-authored-by: googlemaps-bot <googlemaps-bot@google.com> Co-authored-by: Angela Yu <5506675+wangela@users.noreply.github.com>
1 parent 3b8e023 commit 44265dd

5 files changed

Lines changed: 33 additions & 2 deletions

File tree

specification/parameters/_index.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ places_location:
8282
$ref: "./places/location.yml"
8383
places_locationbias:
8484
$ref: "./places/locationbias.yml"
85+
places_locationrestriction:
86+
$ref: "./places/locationrestriction.yml"
8587
places_maxheight:
8688
$ref: "./places/maxheight.yml"
8789
places_maxprice:

specification/parameters/places/locationbias.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ examples:
3030
circular:
3131
value: circle:1000@37.781157,-122.398720
3232
rectangular:
33-
value: rectangle:37.7,-122.4|37.8,-122.3
33+
value: rectangle:37.7,-122.4|37.8,-122.3
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2021 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: locationrestriction
16+
description: |
17+
Restrict results to a specified area, by specifying either a radius plus lat/lng, or two lat/lng pairs representing the points of a rectangle.
18+
- Circular: A string specifying radius in meters, plus lat/lng in decimal degrees. Use the following format: `circle:radius@lat,lng`.
19+
- Rectangular: A string specifying two lat/lng pairs in decimal degrees, representing the south/west and north/east points of a rectangle. Use the following format:`rectangle:south,west|north,east`. Note that east/west values are wrapped to the range -180, 180, and north/south values are clamped to the range -90, 90.
20+
schema:
21+
type: string
22+
in: query
23+
examples:
24+
circular:
25+
value: circle:1000@37.781157,-122.398720
26+
rectangular:
27+
value: rectangle:37.7,-122.4|37.8,-122.3

specification/paths/places/autocomplete.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ parameters:
3838
- "$ref": "../../parameters/places/origin.yml"
3939
- "$ref": "../../parameters/places/location.yml"
4040
- "$ref": "../../parameters/places/locationbias.yml"
41+
- "$ref": "../../parameters/places/locationrestriction.yml"
4142
- "$ref": "../../parameters/places/radius.yml"
4243
- "$ref": "../../parameters/places/types.yml"
4344
- "$ref": "../../parameters/language.yml"
@@ -55,4 +56,4 @@ responses:
5556
value:
5657
$ref: "../../responses/maps_http_places_autocomplete_amoeba_strict_response.yml"
5758
schema:
58-
$ref: "../../schemas/PlacesAutocompleteResponse.yml"
59+
$ref: "../../schemas/PlacesAutocompleteResponse.yml"

specification/paths/places/findplacefromtext.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ parameters:
3232
example: "Museum of Contemporary Art Australia"
3333
- "$ref": "../../parameters/places/inputtype.yml"
3434
- "$ref": "../../parameters/places/locationbias.yml"
35+
- "$ref": "../../parameters/places/locationrestriction.yml"
3536
- "$ref": "../../parameters/language.yml"
3637
responses:
3738
"200":

0 commit comments

Comments
 (0)