@google-cloud/geocode 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +117 -0
- package/build/protos/google/geo/type/viewport.proto +69 -0
- package/build/protos/google/maps/geocode/v4/destination_service.proto +435 -0
- package/build/protos/google/maps/geocode/v4/geocode_service.proto +279 -0
- package/build/protos/protos.d.ts +9343 -0
- package/build/protos/protos.js +25983 -0
- package/build/protos/protos.json +2630 -0
- package/build/src/index.d.ts +14 -0
- package/build/src/index.js +30 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v4/destination_service_client.d.ts +165 -0
- package/build/src/v4/destination_service_client.js +326 -0
- package/build/src/v4/destination_service_client.js.map +1 -0
- package/build/src/v4/destination_service_client_config.json +43 -0
- package/build/src/v4/destination_service_proto_list.json +5 -0
- package/build/src/v4/gapic_metadata.json +77 -0
- package/build/src/v4/geocode_service_client.d.ts +227 -0
- package/build/src/v4/geocode_service_client.js +398 -0
- package/build/src/v4/geocode_service_client.js.map +1 -0
- package/build/src/v4/geocode_service_client_config.json +53 -0
- package/build/src/v4/geocode_service_proto_list.json +5 -0
- package/build/src/v4/index.d.ts +2 -0
- package/build/src/v4/index.js +25 -0
- package/build/src/v4/index.js.map +1 -0
- package/package.json +78 -0
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
|
|
2
|
+
[//]: # "The comments you see below are used to generate those parts of the template in later states."
|
|
3
|
+
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
|
|
4
|
+
|
|
5
|
+
# [Geocoding API: Nodejs Client][homepage]
|
|
6
|
+
|
|
7
|
+
This library is considered to be in **preview**. This means it is still a
|
|
8
|
+
work-in-progress and under active development. Any release is subject to
|
|
9
|
+
backwards-incompatible changes at any time.
|
|
10
|
+
|
|
11
|
+
[](https://www.npmjs.org/package/@google-cloud/geocode)
|
|
12
|
+
|
|
13
|
+
Geocoding API client for Node.js
|
|
14
|
+
|
|
15
|
+
[//]: # "partials.introduction"
|
|
16
|
+
|
|
17
|
+
A comprehensive list of changes in each version may be found in
|
|
18
|
+
[the CHANGELOG][homepage_changelog].
|
|
19
|
+
|
|
20
|
+
* [Geocoding API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/geocode/latest)
|
|
21
|
+
* [Geocoding API Documentation](https://developers.google.com/maps/documentation/geocoding/overview)
|
|
22
|
+
|
|
23
|
+
Read more about the client libraries for Cloud APIs, including the older
|
|
24
|
+
Google APIs Client Libraries, in [Client Libraries Explained][explained].
|
|
25
|
+
|
|
26
|
+
[explained]: https://cloud.google.com/apis/docs/client-libraries-explained
|
|
27
|
+
|
|
28
|
+
**Table of contents:**
|
|
29
|
+
|
|
30
|
+
* [Quickstart](#quickstart)
|
|
31
|
+
* [Before you begin](#before-you-begin)
|
|
32
|
+
* [Installing the client library](#installing-the-client-library)
|
|
33
|
+
|
|
34
|
+
* [Versioning](#versioning)
|
|
35
|
+
* [Contributing](#contributing)
|
|
36
|
+
* [License](#license)
|
|
37
|
+
|
|
38
|
+
## Quickstart
|
|
39
|
+
### Before you begin
|
|
40
|
+
|
|
41
|
+
1. [Select or create a Cloud Platform project][projects].
|
|
42
|
+
1. [Enable billing for your project][billing].
|
|
43
|
+
1. [Enable the Geocoding API API][enable_api].
|
|
44
|
+
1. [Set up authentication][auth] so you can access the
|
|
45
|
+
API from your local workstation.
|
|
46
|
+
### Installing the client library
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm install @google-cloud/geocode
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
[//]: # "partials.body"
|
|
53
|
+
|
|
54
|
+
## Samples
|
|
55
|
+
|
|
56
|
+
Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample.
|
|
57
|
+
|
|
58
|
+
| Sample | Source Code |
|
|
59
|
+
| --------------------------- | --------------------------------- |
|
|
60
|
+
| search destinations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode/samples/generated/v4/destination_service.search_destinations.js) |
|
|
61
|
+
| geocode address | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode/samples/generated/v4/geocode_service.geocode_address.js) |
|
|
62
|
+
| geocode location | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode/samples/generated/v4/geocode_service.geocode_location.js) |
|
|
63
|
+
| geocode place | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode/samples/generated/v4/geocode_service.geocode_place.js) |
|
|
64
|
+
| maps | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode/samples/generated/v4/snippet_metadata_google.maps.geocode.v4.json) |
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## Supported Node.js Versions
|
|
68
|
+
|
|
69
|
+
Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
|
|
70
|
+
Libraries are compatible with all current _active_ and _maintenance_ versions of
|
|
71
|
+
Node.js.
|
|
72
|
+
If you are using an end-of-life version of Node.js, we recommend that you update
|
|
73
|
+
as soon as possible to an actively supported LTS version.
|
|
74
|
+
|
|
75
|
+
Google's client libraries support legacy versions of Node.js runtimes on a
|
|
76
|
+
best-efforts basis with the following warnings:
|
|
77
|
+
|
|
78
|
+
* Legacy versions are not tested in continuous integration.
|
|
79
|
+
* Some security patches and features cannot be backported.
|
|
80
|
+
* Dependencies cannot be kept up-to-date.
|
|
81
|
+
|
|
82
|
+
Client libraries targeting some end-of-life versions of Node.js are available, and
|
|
83
|
+
can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag).
|
|
84
|
+
The dist-tags follow the naming convention `legacy-(version)`.
|
|
85
|
+
For example, `npm install @google-cloud/geocode@legacy-8` installs client libraries
|
|
86
|
+
for versions compatible with Node.js 8.
|
|
87
|
+
|
|
88
|
+
## Versioning
|
|
89
|
+
|
|
90
|
+
This library follows [Semantic Versioning](http://semver.org/).
|
|
91
|
+
|
|
92
|
+
More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
93
|
+
|
|
94
|
+
[launch_stages]: https://cloud.google.com/terms/launch-stages
|
|
95
|
+
|
|
96
|
+
## Contributing
|
|
97
|
+
|
|
98
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode/CONTRIBUTING.md).
|
|
99
|
+
|
|
100
|
+
Please note that this `README.md`
|
|
101
|
+
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
102
|
+
are generated from a central template.
|
|
103
|
+
|
|
104
|
+
## License
|
|
105
|
+
|
|
106
|
+
Apache Version 2.0
|
|
107
|
+
|
|
108
|
+
See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode/LICENSE)
|
|
109
|
+
|
|
110
|
+
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
|
|
111
|
+
[projects]: https://console.cloud.google.com/project
|
|
112
|
+
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
|
|
113
|
+
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=geocoding-backend.googleapis.com
|
|
114
|
+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local
|
|
115
|
+
[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode/samples
|
|
116
|
+
[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode/CHANGELOG.md
|
|
117
|
+
[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-maps-geocode
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Copyright 2025 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
|
+
|
|
16
|
+
syntax = "proto3";
|
|
17
|
+
|
|
18
|
+
package google.geo.type;
|
|
19
|
+
|
|
20
|
+
import "google/type/latlng.proto";
|
|
21
|
+
|
|
22
|
+
option go_package = "google.golang.org/genproto/googleapis/geo/type/viewport;viewport";
|
|
23
|
+
option java_multiple_files = true;
|
|
24
|
+
option java_outer_classname = "ViewportProto";
|
|
25
|
+
option java_package = "com.google.geo.type";
|
|
26
|
+
option objc_class_prefix = "GGTP";
|
|
27
|
+
|
|
28
|
+
// A latitude-longitude viewport, represented as two diagonally opposite `low`
|
|
29
|
+
// and `high` points. A viewport is considered a closed region, i.e. it includes
|
|
30
|
+
// its boundary. The latitude bounds must range between -90 to 90 degrees
|
|
31
|
+
// inclusive, and the longitude bounds must range between -180 to 180 degrees
|
|
32
|
+
// inclusive. Various cases include:
|
|
33
|
+
//
|
|
34
|
+
// - If `low` = `high`, the viewport consists of that single point.
|
|
35
|
+
//
|
|
36
|
+
// - If `low.longitude` > `high.longitude`, the longitude range is inverted
|
|
37
|
+
// (the viewport crosses the 180 degree longitude line).
|
|
38
|
+
//
|
|
39
|
+
// - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees,
|
|
40
|
+
// the viewport includes all longitudes.
|
|
41
|
+
//
|
|
42
|
+
// - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees,
|
|
43
|
+
// the longitude range is empty.
|
|
44
|
+
//
|
|
45
|
+
// - If `low.latitude` > `high.latitude`, the latitude range is empty.
|
|
46
|
+
//
|
|
47
|
+
// Both `low` and `high` must be populated, and the represented box cannot be
|
|
48
|
+
// empty (as specified by the definitions above). An empty viewport will result
|
|
49
|
+
// in an error.
|
|
50
|
+
//
|
|
51
|
+
// For example, this viewport fully encloses New York City:
|
|
52
|
+
//
|
|
53
|
+
// {
|
|
54
|
+
// "low": {
|
|
55
|
+
// "latitude": 40.477398,
|
|
56
|
+
// "longitude": -74.259087
|
|
57
|
+
// },
|
|
58
|
+
// "high": {
|
|
59
|
+
// "latitude": 40.91618,
|
|
60
|
+
// "longitude": -73.70018
|
|
61
|
+
// }
|
|
62
|
+
// }
|
|
63
|
+
message Viewport {
|
|
64
|
+
// Required. The low point of the viewport.
|
|
65
|
+
google.type.LatLng low = 1;
|
|
66
|
+
|
|
67
|
+
// Required. The high point of the viewport.
|
|
68
|
+
google.type.LatLng high = 2;
|
|
69
|
+
}
|
|
@@ -0,0 +1,435 @@
|
|
|
1
|
+
// Copyright 2026 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
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package google.maps.geocode.v4;
|
|
18
|
+
|
|
19
|
+
import "google/api/annotations.proto";
|
|
20
|
+
import "google/api/client.proto";
|
|
21
|
+
import "google/api/field_behavior.proto";
|
|
22
|
+
import "google/protobuf/struct.proto";
|
|
23
|
+
import "google/type/latlng.proto";
|
|
24
|
+
import "google/type/localized_text.proto";
|
|
25
|
+
import "google/type/postal_address.proto";
|
|
26
|
+
|
|
27
|
+
option csharp_namespace = "Google.Maps.Geocode.V4";
|
|
28
|
+
option go_package = "cloud.google.com/go/maps/geocode/apiv4/geocodepb;geocodepb";
|
|
29
|
+
option java_multiple_files = true;
|
|
30
|
+
option java_outer_classname = "DestinationServiceProto";
|
|
31
|
+
option java_package = "com.google.maps.geocode.v4";
|
|
32
|
+
option objc_class_prefix = "GMPG";
|
|
33
|
+
option php_namespace = "Google\\Maps\\Geocode\\V4";
|
|
34
|
+
option ruby_package = "Google::Maps::Geocode::V4";
|
|
35
|
+
|
|
36
|
+
// A service for retrieving destinations.
|
|
37
|
+
//
|
|
38
|
+
// A destination provides hierarchical context about a place, which
|
|
39
|
+
// allows you to, for example, find apartment buildings within a larger
|
|
40
|
+
// apartment complex and vice versa. It also provides navigation points suitable
|
|
41
|
+
// for use cases such as ridesharing or delivery.
|
|
42
|
+
service DestinationService {
|
|
43
|
+
option (google.api.default_host) = "geocoding-backend.googleapis.com";
|
|
44
|
+
option (google.api.oauth_scopes) =
|
|
45
|
+
"https://www.googleapis.com/auth/cloud-platform,"
|
|
46
|
+
"https://www.googleapis.com/auth/maps-platform.destinations,"
|
|
47
|
+
"https://www.googleapis.com/auth/maps-platform.geocode";
|
|
48
|
+
|
|
49
|
+
// This method performs a destination lookup and returns a list of
|
|
50
|
+
// destinations.
|
|
51
|
+
rpc SearchDestinations(SearchDestinationsRequest)
|
|
52
|
+
returns (SearchDestinationsResponse) {
|
|
53
|
+
option (google.api.http) = {
|
|
54
|
+
post: "/v4/geocode/destinations"
|
|
55
|
+
body: "*"
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Request message for DestinationService.SearchDestinations.
|
|
61
|
+
message SearchDestinationsRequest {
|
|
62
|
+
// The street address that you want to search for. Specify addresses in
|
|
63
|
+
// accordance with the format used by the national postal service of the
|
|
64
|
+
// country concerned.
|
|
65
|
+
message AddressQuery {
|
|
66
|
+
// The address query.
|
|
67
|
+
oneof kind {
|
|
68
|
+
// A street address in postal address format.
|
|
69
|
+
google.type.PostalAddress address = 1;
|
|
70
|
+
|
|
71
|
+
// A street address formatted as a single line.
|
|
72
|
+
string address_query = 2;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// A location query to identify a nearby primary destination.
|
|
77
|
+
//
|
|
78
|
+
// Note: if the location query is within a building that contains subpremises,
|
|
79
|
+
// it is possible that the returned primary place is a subpremise. In these
|
|
80
|
+
// cases, the `containing_places` field will include the building.
|
|
81
|
+
message LocationQuery {
|
|
82
|
+
// Filters to apply to destination candidates.
|
|
83
|
+
message PlaceFilter {
|
|
84
|
+
// Defines options for addressability filtering. New values may be added
|
|
85
|
+
// in the future.
|
|
86
|
+
enum Addressability {
|
|
87
|
+
// When unspecified, the service will choose a sensible default.
|
|
88
|
+
ADDRESSABILITY_UNSPECIFIED = 0;
|
|
89
|
+
|
|
90
|
+
// Addressability is not a filtering criteria. Destinations are returned
|
|
91
|
+
// regardless of their addressability.
|
|
92
|
+
ANY = 1;
|
|
93
|
+
|
|
94
|
+
// All destinations returned will have a primary place with a street
|
|
95
|
+
// level address or name.
|
|
96
|
+
PRIMARY = 2;
|
|
97
|
+
|
|
98
|
+
// All destinations returned will have either a primary place or a
|
|
99
|
+
// subdestination with a street level address or name.
|
|
100
|
+
WEAK = 3;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Optional. If specified, all destinations are guaranteed to have a
|
|
104
|
+
// primary place with this structure type. This can result in filtering
|
|
105
|
+
// out some destinations, or in coarsening/refining the returned
|
|
106
|
+
// destinations.
|
|
107
|
+
//
|
|
108
|
+
// For example, if `GROUNDS` is specified, all returned destinations will
|
|
109
|
+
// have a primary place with the `GROUNDS` structure type. This can
|
|
110
|
+
// result in filtering out some destinations that are not part of a
|
|
111
|
+
// grounds, or in coarsening the returned destinations to the grounds
|
|
112
|
+
// level.
|
|
113
|
+
//
|
|
114
|
+
// Another use of this field is to more easily extract building display
|
|
115
|
+
// polygons. For example, if `BUILDING` is specified, the primary place's
|
|
116
|
+
// display polygon will be for the building at the specified location.
|
|
117
|
+
PlaceView.StructureType structure_type = 2
|
|
118
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
119
|
+
|
|
120
|
+
// Optional. If specified, only returns destinations that meet the
|
|
121
|
+
// corresponding addressability criteria.
|
|
122
|
+
Addressability addressability = 3
|
|
123
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// The location query.
|
|
127
|
+
oneof kind {
|
|
128
|
+
// A precise LatLng location.
|
|
129
|
+
google.type.LatLng location = 1;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Optional. Filters to apply to destination candidates.
|
|
133
|
+
PlaceFilter place_filter = 2 [(google.api.field_behavior) = OPTIONAL];
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Query for the primary destination. This can be either a place, a fully
|
|
137
|
+
// specified address, or a LatLng location. Some places and addresses with
|
|
138
|
+
// minimal information won't be able to be turned into a destination.
|
|
139
|
+
//
|
|
140
|
+
// The destinations are built around the specified primary query.
|
|
141
|
+
//
|
|
142
|
+
// Note: only places and addresses that can have a navigational destination
|
|
143
|
+
// are supported. For example, a place that represents a house or an apartment
|
|
144
|
+
// complex can be used as the primary query, but places that represent a
|
|
145
|
+
// locality or an administrative area cannot be used as the primary query.
|
|
146
|
+
oneof primary_query {
|
|
147
|
+
// The resource name of a place, in `places/{place_id}` format.
|
|
148
|
+
string place = 1;
|
|
149
|
+
|
|
150
|
+
// A street address.
|
|
151
|
+
AddressQuery address_query = 2;
|
|
152
|
+
|
|
153
|
+
// A precise location.
|
|
154
|
+
LocationQuery location_query = 3;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// Optional. The travel modes to filter navigation points for. This influences
|
|
158
|
+
// the `navigation_points` field returned in the response. If empty,
|
|
159
|
+
// navigation points of all travel modes are returned.
|
|
160
|
+
repeated NavigationPoint.TravelMode travel_modes = 5
|
|
161
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
162
|
+
|
|
163
|
+
// Optional. Language in which the results should be returned.
|
|
164
|
+
string language_code = 6 [(google.api.field_behavior) = OPTIONAL];
|
|
165
|
+
|
|
166
|
+
// Optional. Region code. The region code, specified as a ccTLD ("top-level
|
|
167
|
+
// domain") two-character value. The parameter affects results based on
|
|
168
|
+
// applicable law. This parameter also influences, but not fully restricts,
|
|
169
|
+
// results from the service.
|
|
170
|
+
string region_code = 7 [(google.api.field_behavior) = OPTIONAL];
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Response message for DestinationService.SearchDestinations.
|
|
174
|
+
message SearchDestinationsResponse {
|
|
175
|
+
// A list of destinations.
|
|
176
|
+
//
|
|
177
|
+
// The service returns one result if a primary destination can be
|
|
178
|
+
// unambiguously identified from the primary query. Otherwise, the service
|
|
179
|
+
// might return multiple results for disambiguation or zero results.
|
|
180
|
+
repeated Destination destinations = 1;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// A destination. This includes the primary place, related places,
|
|
184
|
+
// entrances, and navigation points.
|
|
185
|
+
message Destination {
|
|
186
|
+
// The primary place identified by the `primary_query` in the request.
|
|
187
|
+
PlaceView primary = 1;
|
|
188
|
+
|
|
189
|
+
// The less precise places that the primary place is contained by.
|
|
190
|
+
// For example, the apartment complex that contains this building.
|
|
191
|
+
repeated PlaceView containing_places = 2;
|
|
192
|
+
|
|
193
|
+
// More precise sub-destinations of the primary place. For example, units
|
|
194
|
+
// contained in a building.
|
|
195
|
+
//
|
|
196
|
+
// Note: compared to the
|
|
197
|
+
// [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
|
|
198
|
+
// returned by the Places API, this list of sub-destinations is more
|
|
199
|
+
// exhaustive, and each sub-destination contains more information.
|
|
200
|
+
repeated PlaceView sub_destinations = 3;
|
|
201
|
+
|
|
202
|
+
// Landmarks that can be used to communicate where the destination is
|
|
203
|
+
// or help with arrival.
|
|
204
|
+
repeated Landmark landmarks = 4;
|
|
205
|
+
|
|
206
|
+
// Entrances for this destination.
|
|
207
|
+
repeated Entrance entrances = 5;
|
|
208
|
+
|
|
209
|
+
// Navigation points for this destination.
|
|
210
|
+
repeated NavigationPoint navigation_points = 6;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
// Represents a view of a
|
|
214
|
+
// [Place](https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#resource:-place)
|
|
215
|
+
// in the Places API. It also provides additional information specific to
|
|
216
|
+
// destinations, such as the structure type and the display polygon.
|
|
217
|
+
//
|
|
218
|
+
// In some cases, a `PlaceView` with the same place ID might differ from what
|
|
219
|
+
// is being returned by the Places API for the `types` and
|
|
220
|
+
// `display_name` fields.
|
|
221
|
+
message PlaceView {
|
|
222
|
+
// The type of structure that this place represents.
|
|
223
|
+
enum StructureType {
|
|
224
|
+
// Not used.
|
|
225
|
+
STRUCTURE_TYPE_UNSPECIFIED = 0;
|
|
226
|
+
|
|
227
|
+
// A point location.
|
|
228
|
+
POINT = 1;
|
|
229
|
+
|
|
230
|
+
// A sub-section of a building.
|
|
231
|
+
SECTION = 2;
|
|
232
|
+
|
|
233
|
+
// A building.
|
|
234
|
+
BUILDING = 3;
|
|
235
|
+
|
|
236
|
+
// A large area that typically contains multiple buildings, such as a
|
|
237
|
+
// university campus, an apartment complex, or a shopping mall.
|
|
238
|
+
GROUNDS = 4;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// This Place's resource name, in `places/{placeId}` format. Can be used to
|
|
242
|
+
// look up the Place.
|
|
243
|
+
string place = 1;
|
|
244
|
+
|
|
245
|
+
// The unique identifier of a place.
|
|
246
|
+
string place_id = 2;
|
|
247
|
+
|
|
248
|
+
// Human readable place description. For example, "Gate B", "McDonalds"
|
|
249
|
+
google.type.LocalizedText display_name = 3;
|
|
250
|
+
|
|
251
|
+
// The primary place type of this place. See
|
|
252
|
+
// https://developers.google.com/maps/documentation/places/web-service/place-types
|
|
253
|
+
// for the list of possible values.
|
|
254
|
+
//
|
|
255
|
+
// Note: This field is not always populated. Be prepared to use the `types`
|
|
256
|
+
// field in such situations.
|
|
257
|
+
string primary_type = 4;
|
|
258
|
+
|
|
259
|
+
// All associated place types of this place. See
|
|
260
|
+
// https://developers.google.com/maps/documentation/places/web-service/place-types
|
|
261
|
+
// for the list of possible values.
|
|
262
|
+
repeated string types = 5;
|
|
263
|
+
|
|
264
|
+
// One line address.
|
|
265
|
+
string formatted_address = 6;
|
|
266
|
+
|
|
267
|
+
// Structured address.
|
|
268
|
+
google.type.PostalAddress postal_address = 7;
|
|
269
|
+
|
|
270
|
+
// The type of structure corresponding to this place.
|
|
271
|
+
StructureType structure_type = 8;
|
|
272
|
+
|
|
273
|
+
// The location of this place. For places with display polygons, this can
|
|
274
|
+
// represent a good spot to put a marker on the map.
|
|
275
|
+
google.type.LatLng location = 9;
|
|
276
|
+
|
|
277
|
+
// The polygon outline of the place in GeoJSON format, using the RFC 7946
|
|
278
|
+
// format: https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.
|
|
279
|
+
//
|
|
280
|
+
// Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
|
|
281
|
+
// object can represent multiple polygons.
|
|
282
|
+
google.protobuf.Struct display_polygon = 10;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
// An entrance is a single latitude/longitude coordinate pair that defines the
|
|
286
|
+
// location of an entry and exit point for a place.
|
|
287
|
+
message Entrance {
|
|
288
|
+
// Characteristics that describe an entrance.
|
|
289
|
+
enum Tag {
|
|
290
|
+
// Not used.
|
|
291
|
+
TAG_UNSPECIFIED = 0;
|
|
292
|
+
|
|
293
|
+
// The entrance likely provides physical access to the primary place in
|
|
294
|
+
// the returned destination. A place can have multiple preferred entrances.
|
|
295
|
+
// If an entrance does not have this tag, it means the entrance is
|
|
296
|
+
// physically on the same building as the primary place, but does not
|
|
297
|
+
// necessarily provide access to the place.
|
|
298
|
+
//
|
|
299
|
+
// For example, if the primary place is a restaurant in a strip mall, the
|
|
300
|
+
// "PREFERRED" entrances will be the ones that likely lead into the
|
|
301
|
+
// restaurant itself, while the other returned entrances will be other
|
|
302
|
+
// entrances for the building, such as entrances into other restaurants in
|
|
303
|
+
// the strip mall.
|
|
304
|
+
//
|
|
305
|
+
// If the primary place is a building itself, the `PREFERRED` entrances
|
|
306
|
+
// will be the ones that lead into the "main" part of the building. For
|
|
307
|
+
// example, in a shopping center the `PREFERRED` entrances will be the ones
|
|
308
|
+
// that allow access to the main foyer area, but if an entrance only
|
|
309
|
+
// provides access to a store on the side of the building, it won't be a
|
|
310
|
+
// `PREFERRED` entrance.
|
|
311
|
+
//
|
|
312
|
+
// Note: a `PREFERRED` entrance might not provide access to the primary
|
|
313
|
+
// place, and a non-`PREFERRED` entrance might provide access to the
|
|
314
|
+
// primary place.
|
|
315
|
+
PREFERRED = 1;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// The location of the entrance.
|
|
319
|
+
google.type.LatLng location = 2;
|
|
320
|
+
|
|
321
|
+
// A list of tags that describe the entrance.
|
|
322
|
+
repeated Tag tags = 3;
|
|
323
|
+
|
|
324
|
+
// The structure this entrance is physically located on, in
|
|
325
|
+
// `places/{place_id}` format.
|
|
326
|
+
string place = 4;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// A navigation point is a location next to a road where navigation can end.
|
|
330
|
+
message NavigationPoint {
|
|
331
|
+
// Travel modes that are appropriate for this navigation point.
|
|
332
|
+
enum TravelMode {
|
|
333
|
+
// Not used.
|
|
334
|
+
TRAVEL_MODE_UNSPECIFIED = 0;
|
|
335
|
+
|
|
336
|
+
// Suitable for driving.
|
|
337
|
+
DRIVE = 1;
|
|
338
|
+
|
|
339
|
+
// Suitable for walking.
|
|
340
|
+
WALK = 2;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// Usages supported by this navigation point.
|
|
344
|
+
// New values may be added in the future.
|
|
345
|
+
enum Usage {
|
|
346
|
+
// Not used.
|
|
347
|
+
USAGE_UNSPECIFIED = 0;
|
|
348
|
+
|
|
349
|
+
// Indicates that the usage type is unknown.
|
|
350
|
+
UNKNOWN = 1;
|
|
351
|
+
|
|
352
|
+
// Suitable for dropping off a passenger. For example, a rideshare drop off
|
|
353
|
+
// location.
|
|
354
|
+
DROPOFF = 2;
|
|
355
|
+
|
|
356
|
+
// Suitable for picking up a passenger. For example, a rideshare pick up
|
|
357
|
+
// location.
|
|
358
|
+
PICKUP = 3;
|
|
359
|
+
|
|
360
|
+
// Suitable for parking. For example, within a parking lot.
|
|
361
|
+
PARKING = 4;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// Output only. A token that can be used to identify this navigation point.
|
|
365
|
+
string navigation_point_token = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
366
|
+
|
|
367
|
+
// The display name of this navigation point. For example, "5th Ave" or "Gate
|
|
368
|
+
// B".
|
|
369
|
+
google.type.LocalizedText display_name = 2;
|
|
370
|
+
|
|
371
|
+
// A point next to the road segment where navigation should end. The point is
|
|
372
|
+
// intentionally slightly offset from the road's centerline to clearly mark
|
|
373
|
+
// the side of the road where the place is located.
|
|
374
|
+
google.type.LatLng location = 3;
|
|
375
|
+
|
|
376
|
+
// Travel modes that are appropriate for this navigation point.
|
|
377
|
+
repeated TravelMode travel_modes = 4;
|
|
378
|
+
|
|
379
|
+
// Lists `usages` supported by this navigation point. If empty, it does not
|
|
380
|
+
// necessarily mean its usage is restricted in any way. All navigation
|
|
381
|
+
// points can be used for general navigation.
|
|
382
|
+
repeated Usage usages = 5;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// Landmarks are used to communicate where the destination is or help with
|
|
386
|
+
// arriving at the destination.
|
|
387
|
+
message Landmark {
|
|
388
|
+
// The list of all possible tags that describe how a landmark can be used in
|
|
389
|
+
// the context of a destination.
|
|
390
|
+
//
|
|
391
|
+
// If an address has both the `ADDRESS` and `ARRIVAL` tags, it means the
|
|
392
|
+
// landmark is both locally prominent and close to the destination.
|
|
393
|
+
enum Tag {
|
|
394
|
+
// Not used.
|
|
395
|
+
TAG_UNSPECIFIED = 0;
|
|
396
|
+
|
|
397
|
+
// A locally prominent place that can be used to identify the general
|
|
398
|
+
// location of the destination. Typically within a few hundred meters of the
|
|
399
|
+
// destination. These are similar to the landmarks returned by the
|
|
400
|
+
// Address Descriptors feature of the Geocoding API:
|
|
401
|
+
// https://developers.google.com/maps/documentation/geocoding/address-descriptors/requests-address-descriptors.
|
|
402
|
+
ADDRESS = 1;
|
|
403
|
+
|
|
404
|
+
// A place that can be used to help arrive at the destination. Useful for
|
|
405
|
+
// navigation once you are close to the destination. For example, this
|
|
406
|
+
// landmark might be a place that is across the street from the destination.
|
|
407
|
+
// A landmark with this tag is typically closer to the destination than
|
|
408
|
+
// landmarks with the `ADDRESS` tag.
|
|
409
|
+
ARRIVAL = 2;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// The landmark.
|
|
413
|
+
oneof landmark {
|
|
414
|
+
// The place that represents this landmark.
|
|
415
|
+
PlaceView place = 1;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// A human-readable description of how the destination relates to the
|
|
419
|
+
// landmark. For example: "Near the Empire State Building" or "Across from
|
|
420
|
+
// the White House".
|
|
421
|
+
google.type.LocalizedText relational_description = 2;
|
|
422
|
+
|
|
423
|
+
// Tags that describe how the landmark can be used in the context of the
|
|
424
|
+
// destination.
|
|
425
|
+
repeated Tag tags = 3;
|
|
426
|
+
|
|
427
|
+
// Output only. The straight-line distance from this landmark to the
|
|
428
|
+
// destination in meters.
|
|
429
|
+
double straight_line_distance_meters = 4
|
|
430
|
+
[(google.api.field_behavior) = OUTPUT_ONLY];
|
|
431
|
+
|
|
432
|
+
// Output only. The road-network distance from this landmark to the
|
|
433
|
+
// destination in meters.
|
|
434
|
+
double travel_distance_meters = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
|
|
435
|
+
}
|