@esri/arcgis-rest-places 1.0.0
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 +89 -0
- package/dist/bundled/places.esm.js +217 -0
- package/dist/bundled/places.esm.js.map +1 -0
- package/dist/bundled/places.esm.min.js +7 -0
- package/dist/bundled/places.esm.min.js.map +1 -0
- package/dist/bundled/places.umd.js +229 -0
- package/dist/bundled/places.umd.js.map +1 -0
- package/dist/bundled/places.umd.min.js +7 -0
- package/dist/bundled/places.umd.min.js.map +1 -0
- package/dist/cjs/findPlacesNearPoint.js +58 -0
- package/dist/cjs/findPlacesNearPoint.js.map +1 -0
- package/dist/cjs/findPlacesWithinExtent.js +68 -0
- package/dist/cjs/findPlacesWithinExtent.js.map +1 -0
- package/dist/cjs/getCategories.js +33 -0
- package/dist/cjs/getCategories.js.map +1 -0
- package/dist/cjs/getCategory.js +27 -0
- package/dist/cjs/getCategory.js.map +1 -0
- package/dist/cjs/getPlaceDetails.js +40 -0
- package/dist/cjs/getPlaceDetails.js.map +1 -0
- package/dist/cjs/index.js +11 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/openapi-types.js +7 -0
- package/dist/cjs/openapi-types.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/utils.js +17 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/findPlacesNearPoint.d.ts +55 -0
- package/dist/esm/findPlacesNearPoint.js +54 -0
- package/dist/esm/findPlacesNearPoint.js.map +1 -0
- package/dist/esm/findPlacesWithinExtent.d.ts +56 -0
- package/dist/esm/findPlacesWithinExtent.js +64 -0
- package/dist/esm/findPlacesWithinExtent.js.map +1 -0
- package/dist/esm/getCategories.d.ts +38 -0
- package/dist/esm/getCategories.js +29 -0
- package/dist/esm/getCategories.js.map +1 -0
- package/dist/esm/getCategory.d.ts +32 -0
- package/dist/esm/getCategory.js +23 -0
- package/dist/esm/getCategory.js.map +1 -0
- package/dist/esm/getPlaceDetails.d.ts +45 -0
- package/dist/esm/getPlaceDetails.js +36 -0
- package/dist/esm/getPlaceDetails.js.map +1 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/openapi-types.d.ts +1499 -0
- package/dist/esm/openapi-types.js +6 -0
- package/dist/esm/openapi-types.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/utils.d.ts +6 -0
- package/dist/esm/utils.js +12 -0
- package/dist/esm/utils.js.map +1 -0
- package/package.json +74 -0
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
[![npm version][npm-img]][npm-url]
|
|
2
|
+
[![build status][travis-img]][travis-url]
|
|
3
|
+
[![gzip bundle size][gzip-image]][npm-url]
|
|
4
|
+
[![Coverage Status][coverage-img]][coverage-url]
|
|
5
|
+
[](https://raw.githubusercontent.com/Esri/arcgis-rest-js/master/LICENSE)
|
|
6
|
+
|
|
7
|
+
[npm-img]: https://img.shields.io/npm/v/@esri/arcgis-rest-places.svg?style=flat-square
|
|
8
|
+
[npm-url]: https://www.npmjs.com/package/@esri/arcgis-rest-places
|
|
9
|
+
[travis-img]: https://img.shields.io/travis/Esri/arcgis-rest-js/master.svg?style=flat-square
|
|
10
|
+
[travis-url]: https://travis-ci.org/Esri/arcgis-rest-js
|
|
11
|
+
[gzip-image]: https://img.badgesize.io/https://unpkg.com/@esri/arcgis-rest-places/dist/bundled/places.umd.min.js?compression=gzip
|
|
12
|
+
[coverage-img]: https://codecov.io/gh/Esri/arcgis-rest-js/branch/master/graph/badge.svg
|
|
13
|
+
[coverage-url]: https://codecov.io/gh/Esri/arcgis-rest-js
|
|
14
|
+
|
|
15
|
+
# @esri/arcgis-rest-places
|
|
16
|
+
|
|
17
|
+
> Place finding helpers for [`@esri/arcgis-rest-request`](https://github.com/Esri/arcgis-rest-js).
|
|
18
|
+
|
|
19
|
+
### Example
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install @esri/arcgis-rest-request
|
|
23
|
+
npm install @esri/arcgis-rest-places
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { ApiKeyManager } from "@esri/arcgis-rest-request;
|
|
28
|
+
import { findPlacesNearPoint
|
|
29
|
+
} from "@esri/arcgis-rest-places"
|
|
30
|
+
|
|
31
|
+
const { places } = await findPlacesNearPoint({
|
|
32
|
+
x: -3.1883,
|
|
33
|
+
y: 55.9533,
|
|
34
|
+
categoryIds: ["13002"],
|
|
35
|
+
authentication: ApiKeyManager.fromKey("YOUR_API_KEY")
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
console.log(places[0].name);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### [API Reference](https://esri.github.io/arcgis-rest-js/api/places/)
|
|
42
|
+
|
|
43
|
+
@TODO
|
|
44
|
+
|
|
45
|
+
### Issues
|
|
46
|
+
|
|
47
|
+
If something isn't working the way you expected, please take a look at [previously logged issues](https://github.com/Esri/arcgis-rest-js/issues) first. Have you found a new bug? Want to request a new feature? We'd [**love**](https://github.com/Esri/arcgis-rest-js/issues/new) to hear from you.
|
|
48
|
+
|
|
49
|
+
If you're looking for help you can also post issues on [GIS Stackexchange](http://gis.stackexchange.com/questions/ask?tags=esri-oss).
|
|
50
|
+
|
|
51
|
+
### Versioning
|
|
52
|
+
|
|
53
|
+
For transparency into the release cycle and in striving to maintain backward compatibility, @esri/arcgis-rest-js is maintained under Semantic Versioning guidelines and will adhere to these rules whenever possible.
|
|
54
|
+
|
|
55
|
+
For more information on SemVer, please visit <http://semver.org/>.
|
|
56
|
+
|
|
57
|
+
### Contributing
|
|
58
|
+
|
|
59
|
+
Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](CONTRIBUTING.md).
|
|
60
|
+
|
|
61
|
+
### Generating Types from Open API
|
|
62
|
+
|
|
63
|
+
The places service publishes an Open API definition. Eventually this will live at a public URL on the service itself. However for now it lives inside the Esri internal GitHub Enterprise installation. To generate the types view the raw file on GitHub Enterprise and replace the URL below.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
npx openapi-typescript@5 URL_TO_RAW_SPEC_FILE --output packages/arcgis-rest-places/src/openapi-types.ts
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The generated types are used in the interfaces for ArcGIS REST JS.
|
|
70
|
+
|
|
71
|
+
### [Changelog](https://github.com/Esri/arcgis-rest-js/blob/master/CHANGELOG.md)
|
|
72
|
+
|
|
73
|
+
### License
|
|
74
|
+
|
|
75
|
+
Copyright © 2023 Esri
|
|
76
|
+
|
|
77
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
78
|
+
you may not use this file except in compliance with the License.
|
|
79
|
+
You may obtain a copy of the License at
|
|
80
|
+
|
|
81
|
+
> http://www.apache.org/licenses/LICENSE-2.0
|
|
82
|
+
|
|
83
|
+
Unless required by applicable law or agreed to in writing, software
|
|
84
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
85
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
86
|
+
See the License for the specific language governing permissions and
|
|
87
|
+
limitations under the License.
|
|
88
|
+
|
|
89
|
+
A copy of the license is available in the repository's [LICENSE](../../LICENSE) file.
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/* @preserve
|
|
2
|
+
* @esri/arcgis-rest-places - v4.0.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2023 Esri, Inc.
|
|
4
|
+
* Thu May 04 2023 19:07:08 GMT+0000 (Coordinated Universal Time)
|
|
5
|
+
*/
|
|
6
|
+
import { appendCustomParams, request } from '@esri/arcgis-rest-request';
|
|
7
|
+
|
|
8
|
+
const baseUrl = "https://places-api.arcgis.com/arcgis/rest/services/places-service/v1";
|
|
9
|
+
function hasNextPage(response) {
|
|
10
|
+
var _a;
|
|
11
|
+
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next);
|
|
12
|
+
}
|
|
13
|
+
function getNextPageParams(currentOffset = 0, currentPageSize = 10) {
|
|
14
|
+
return {
|
|
15
|
+
offset: currentOffset + currentPageSize,
|
|
16
|
+
pageSize: currentPageSize
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Searches places that are within a given radius of a geographic point.
|
|
22
|
+
* You must supply the `x` and `y` coordinates of the point that you wish
|
|
23
|
+
* to search from. You can either specify a search radius, or use the
|
|
24
|
+
* default (500 meters). You could use this method to search for places
|
|
25
|
+
* around a user's GPS position, or a location clicked on a map.
|
|
26
|
+
*
|
|
27
|
+
* The returned places contain basic data such as name, category and
|
|
28
|
+
* location. You can use the {@linkcode getPlace} method to get additional
|
|
29
|
+
* details for a given place.
|
|
30
|
+
*
|
|
31
|
+
* You can refine the results by supplying additional search parameters,
|
|
32
|
+
* including:
|
|
33
|
+
*
|
|
34
|
+
* - A list of category Ids, see {@linkcode searchCategories} or {@linkcode getCategories}.
|
|
35
|
+
* - A partial name filter with `name` option
|
|
36
|
+
*
|
|
37
|
+
* As this request can return many results, pagination is supported.
|
|
38
|
+
* Regardless of paging, the maximum number of places that can be returned
|
|
39
|
+
* by a single query is `200`. When a query results in more than `200`
|
|
40
|
+
* places, the response will contain the property
|
|
41
|
+
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded`
|
|
42
|
+
* is true an additional method `response.nextPage()` can be used to get the next page of results.
|
|
43
|
+
*
|
|
44
|
+
* ```js
|
|
45
|
+
* import { findPlacesNearPoint } from "@esri/arcgis-rest-places";
|
|
46
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
47
|
+
*
|
|
48
|
+
* const response = await findPlacesNearPoint({
|
|
49
|
+
* x: -3.1883,
|
|
50
|
+
* y: 55.9533,
|
|
51
|
+
* radius: 100,
|
|
52
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY");
|
|
53
|
+
* });
|
|
54
|
+
*
|
|
55
|
+
* console.log(response);
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
function findPlacesNearPoint(requestOptions) {
|
|
59
|
+
const options = appendCustomParams(requestOptions, ["x", "y", "radius", "categoryIds", "pageSize", "offset", "searchText"], Object.assign({}, requestOptions));
|
|
60
|
+
return request(`${baseUrl}/places/near-point`, Object.assign(Object.assign({}, options), { httpMethod: "GET" })).then((response) => {
|
|
61
|
+
const r = Object.assign({}, response);
|
|
62
|
+
if (hasNextPage(response)) {
|
|
63
|
+
r.nextPage = () => {
|
|
64
|
+
const nextOptions = Object.assign(Object.assign({}, requestOptions), getNextPageParams(requestOptions.offset, requestOptions.pageSize));
|
|
65
|
+
return findPlacesNearPoint(nextOptions);
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
return r;
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Searches the world-wide set of places for those that are within an
|
|
74
|
+
* extent, or bounding box. You must supply the `xmin`, `ymin`, `xmax` and
|
|
75
|
+
* `ymax` coordinates of the extent. You could use this endpoint to search
|
|
76
|
+
* for places in the visible extent of a user's screen.
|
|
77
|
+
*
|
|
78
|
+
* The returned places contain basic data such as name, category and
|
|
79
|
+
* location. You can use the {@linkcode getPlace} method to get additional
|
|
80
|
+
* details for a given place.
|
|
81
|
+
*
|
|
82
|
+
* You can also refine the results by supplying additional search parameters,
|
|
83
|
+
* including:
|
|
84
|
+
*
|
|
85
|
+
* - A list of category Ids, see {@linkcode searchCategories} or {@linkcode getCategories}.
|
|
86
|
+
* - A partial name filter with `name` option
|
|
87
|
+
*
|
|
88
|
+
* As this request can return many results, pagination is supported.
|
|
89
|
+
* Regardless of paging, the maximum number of places that can be returned
|
|
90
|
+
* by a single query is `200`. When a query results in more than `200`
|
|
91
|
+
* places, the response will contain the property
|
|
92
|
+
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded`
|
|
93
|
+
* is true an additional method `response.nextPage()` can be used to get the next page of results.
|
|
94
|
+
*
|
|
95
|
+
* ```
|
|
96
|
+
* import { findPlacesWithinExtent } from "@esri/arcgis-rest-places";
|
|
97
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
98
|
+
*
|
|
99
|
+
* const results = await findPlacesWithinExtent({
|
|
100
|
+
* xmin: -118.013334,
|
|
101
|
+
* ymin: 33.78193,
|
|
102
|
+
* xmax: -117.795753,
|
|
103
|
+
* ymax: 33.873337,
|
|
104
|
+
* categoryIds: ["13002"],
|
|
105
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY");
|
|
106
|
+
* });
|
|
107
|
+
*
|
|
108
|
+
* console.log(results)
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
function findPlacesWithinExtent(requestOptions) {
|
|
112
|
+
const options = appendCustomParams(requestOptions, [
|
|
113
|
+
"xmin",
|
|
114
|
+
"ymin",
|
|
115
|
+
"xmax",
|
|
116
|
+
"ymax",
|
|
117
|
+
"categoryIds",
|
|
118
|
+
"pageSize",
|
|
119
|
+
"offset",
|
|
120
|
+
"searchText"
|
|
121
|
+
], Object.assign({}, requestOptions));
|
|
122
|
+
return request(`${baseUrl}/places/within-extent`, Object.assign(Object.assign({}, options), { httpMethod: "GET" })).then((response) => {
|
|
123
|
+
const r = Object.assign({}, response);
|
|
124
|
+
if (hasNextPage(response)) {
|
|
125
|
+
r.nextPage = () => {
|
|
126
|
+
const nextOptions = Object.assign(Object.assign({}, requestOptions), getNextPageParams(requestOptions.offset, requestOptions.pageSize));
|
|
127
|
+
return findPlacesWithinExtent(nextOptions);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
return r;
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Returns a single place, including additional details, such as:
|
|
136
|
+
*
|
|
137
|
+
* - contact details
|
|
138
|
+
* - address
|
|
139
|
+
* - price information
|
|
140
|
+
* - user rating
|
|
141
|
+
* - opening hours
|
|
142
|
+
*
|
|
143
|
+
* This endpoint can be used to fetch additional details for a specific
|
|
144
|
+
* place, returned from a places search request.
|
|
145
|
+
*
|
|
146
|
+
* Note that some fields, such as opening hours, are not available for
|
|
147
|
+
* every place. Where a field is not available it will be omitted from the
|
|
148
|
+
* response and you will not be charged for this data.
|
|
149
|
+
*
|
|
150
|
+
* ```js
|
|
151
|
+
* import { getPlaceDetails } from "@esri/arcgis-rest-places";
|
|
152
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
153
|
+
*
|
|
154
|
+
* const place = getPlaceDetails({
|
|
155
|
+
* placeId: "e78051acc722c55ab11ba930d8dd7772",
|
|
156
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY");
|
|
157
|
+
* });
|
|
158
|
+
*
|
|
159
|
+
* console.log(place);
|
|
160
|
+
* ```
|
|
161
|
+
*/
|
|
162
|
+
function getPlaceDetails(requestOptions) {
|
|
163
|
+
const { placeId } = requestOptions;
|
|
164
|
+
const options = appendCustomParams(requestOptions, ["requestedFields"], Object.assign({}, requestOptions));
|
|
165
|
+
return request(`${baseUrl}/places/${placeId}`, Object.assign(Object.assign({}, options), { httpMethod: "GET" }));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* The ArcGIS Places service has many categories (or types) of place, from
|
|
170
|
+
* art museums to zoos. This endpoint returns all the categories including
|
|
171
|
+
* their label and `categoryId`. The category Id can be used to search for
|
|
172
|
+
* types of places with a `places/near-point` or `places/within-extent`
|
|
173
|
+
* request.
|
|
174
|
+
*
|
|
175
|
+
* Categories also have information on their `parent`. This allows you to
|
|
176
|
+
* search for specific categories such as "French Restaurant" - or to
|
|
177
|
+
* look for more generic types such as "Restaurant".
|
|
178
|
+
*
|
|
179
|
+
* ```js
|
|
180
|
+
* import { getCategories } from "@esri/arcgis-rest-places";
|
|
181
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
182
|
+
*
|
|
183
|
+
* const response = await getCategories({
|
|
184
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY")
|
|
185
|
+
* });
|
|
186
|
+
*
|
|
187
|
+
* console.log(response.categories);
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
function getCategories(requestOptions) {
|
|
191
|
+
const options = appendCustomParams(requestOptions, ["filter"], Object.assign({}, requestOptions));
|
|
192
|
+
return request(`${baseUrl}/categories`, Object.assign(Object.assign({}, options), { httpMethod: "GET" }));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Returns details about a single category by Id.
|
|
197
|
+
*
|
|
198
|
+
* ```js
|
|
199
|
+
* import { getCategories } from "@esri/arcgis-rest-places";
|
|
200
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
201
|
+
*
|
|
202
|
+
* const response = getCategory({
|
|
203
|
+
* categoryId: "10000",
|
|
204
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY");
|
|
205
|
+
* });
|
|
206
|
+
*
|
|
207
|
+
* console.log(response);
|
|
208
|
+
* ```
|
|
209
|
+
**/
|
|
210
|
+
function getCategory(requestOptions) {
|
|
211
|
+
const { categoryId } = requestOptions;
|
|
212
|
+
const options = appendCustomParams(requestOptions, [], Object.assign({}, requestOptions));
|
|
213
|
+
return request(`${baseUrl}/categories/${categoryId}`, Object.assign(Object.assign({}, options), { httpMethod: "GET" }));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export { findPlacesNearPoint, findPlacesWithinExtent, getCategories, getCategory, getPlaceDetails };
|
|
217
|
+
//# sourceMappingURL=places.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"places.esm.js","sources":["../../src/utils.ts","../../src/findPlacesNearPoint.ts","../../src/findPlacesWithinExtent.ts","../../src/getPlaceDetails.ts","../../src/getCategories.ts","../../src/getCategory.ts"],"sourcesContent":["export const baseUrl =\n \"https://places-api.arcgis.com/arcgis/rest/services/places-service/v1\";\n\nexport function hasNextPage(response: any) {\n return !!response?.links?.next;\n}\n\nexport function getNextPageParams(currentOffset = 0, currentPageSize = 10) {\n return {\n offset: currentOffset + currentPageSize,\n pageSize: currentPageSize\n };\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl, hasNextPage, getNextPageParams } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"nearPointGet\"][\"parameters\"][\"query\"],\n \"x\" | \"y\" | \"radius\" | \"categoryIds\" | \"pageSize\" | \"offset\" | \"searchText\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"nearPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findPlacesNearPoint};\n */\nexport interface IFindPlacesNearPointResponse extends successResponse {\n nextPage?: () => Promise<IFindPlacesNearPointResponse>;\n}\n\n/**\n * Options for {@linkcode findPlacesNearPoint}.\n */\nexport interface IFindPlacesNearPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * Searches places that are within a given radius of a geographic point.\n * You must supply the `x` and `y` coordinates of the point that you wish\n * to search from. You can either specify a search radius, or use the\n * default (500 meters). You could use this method to search for places\n * around a user's GPS position, or a location clicked on a map.\n *\n * The returned places contain basic data such as name, category and\n * location. You can use the {@linkcode getPlace} method to get additional\n * details for a given place.\n *\n * You can refine the results by supplying additional search parameters,\n * including:\n *\n * - A list of category Ids, see {@linkcode searchCategories} or {@linkcode getCategories}.\n * - A partial name filter with `name` option\n *\n * As this request can return many results, pagination is supported.\n * Regardless of paging, the maximum number of places that can be returned\n * by a single query is `200`. When a query results in more than `200`\n * places, the response will contain the property\n * `\"maxResultsExceeded\":true` in addition to place results. If `maxResultsExceeded`\n * is true an additional method `response.nextPage()` can be used to get the next page of results.\n *\n * ```js\n * import { findPlacesNearPoint } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const response = await findPlacesNearPoint({\n * x: -3.1883,\n * y: 55.9533,\n * radius: 100,\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\");\n * });\n *\n * console.log(response);\n * ```\n */\nexport function findPlacesNearPoint(\n requestOptions: IFindPlacesNearPointOptions\n): Promise<IFindPlacesNearPointResponse> {\n const options = appendCustomParams<IFindPlacesNearPointOptions>(\n requestOptions,\n [\"x\", \"y\", \"radius\", \"categoryIds\", \"pageSize\", \"offset\", \"searchText\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/places/near-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindPlacesNearPointResponse = {\n ...response\n };\n\n if (hasNextPage(response)) {\n r.nextPage = () => {\n const nextOptions = {\n ...requestOptions,\n ...getNextPageParams(requestOptions.offset, requestOptions.pageSize)\n };\n return findPlacesNearPoint(nextOptions);\n };\n }\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl, hasNextPage, getNextPageParams } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"withinExtentGet\"][\"parameters\"][\"query\"],\n | \"xmin\"\n | \"ymin\"\n | \"xmax\"\n | \"ymax\"\n | \"categoryIds\"\n | \"pageSize\"\n | \"offset\"\n | \"searchText\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"withinExtentGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findPlacesWithinExtent};\n */\nexport interface IFindPlacesWithinExtentResponse extends successResponse {\n nextPage?: () => Promise<IFindPlacesWithinExtentResponse>;\n}\n\n/**\n * Options for {@linkcode findPlacesNearPoint}.\n */\nexport interface IFindPlaceWithinExtentOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * Searches the world-wide set of places for those that are within an\n * extent, or bounding box. You must supply the `xmin`, `ymin`, `xmax` and\n * `ymax` coordinates of the extent. You could use this endpoint to search\n * for places in the visible extent of a user's screen.\n *\n * The returned places contain basic data such as name, category and\n * location. You can use the {@linkcode getPlace} method to get additional\n * details for a given place.\n *\n * You can also refine the results by supplying additional search parameters,\n * including:\n *\n * - A list of category Ids, see {@linkcode searchCategories} or {@linkcode getCategories}.\n * - A partial name filter with `name` option\n *\n * As this request can return many results, pagination is supported.\n * Regardless of paging, the maximum number of places that can be returned\n * by a single query is `200`. When a query results in more than `200`\n * places, the response will contain the property\n * `\"maxResultsExceeded\":true` in addition to place results. If `maxResultsExceeded`\n * is true an additional method `response.nextPage()` can be used to get the next page of results.\n *\n * ```\n * import { findPlacesWithinExtent } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findPlacesWithinExtent({\n * xmin: -118.013334,\n * ymin: 33.78193,\n * xmax: -117.795753,\n * ymax: 33.873337,\n * categoryIds: [\"13002\"],\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findPlacesWithinExtent(\n requestOptions: IFindPlaceWithinExtentOptions\n): Promise<IFindPlacesWithinExtentResponse> {\n const options = appendCustomParams<IFindPlaceWithinExtentOptions>(\n requestOptions,\n [\n \"xmin\",\n \"ymin\",\n \"xmax\",\n \"ymax\",\n \"categoryIds\",\n \"pageSize\",\n \"offset\",\n \"searchText\"\n ],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/places/within-extent`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindPlacesWithinExtentResponse = {\n ...response\n };\n\n if (hasNextPage(response)) {\n r.nextPage = () => {\n const nextOptions = {\n ...requestOptions,\n ...getNextPageParams(requestOptions.offset, requestOptions.pageSize)\n };\n return findPlacesWithinExtent(nextOptions);\n };\n }\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"placeIdGet\"][\"parameters\"][\"query\"],\n \"requestedFields\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"placeIdGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode getPlace};\n */\nexport interface IGetPlaceResponse extends successResponse {}\n\n/**\n * Options for {@linkcode getPlace}.\n */\nexport interface IGetPlaceOptions\n extends Omit<IRequestOptions, \"httpMethod\">,\n queryParams {\n placeId: string;\n}\n\n/**\n * Returns a single place, including additional details, such as:\n *\n * - contact details\n * - address\n * - price information\n * - user rating\n * - opening hours\n *\n * This endpoint can be used to fetch additional details for a specific\n * place, returned from a places search request.\n *\n * Note that some fields, such as opening hours, are not available for\n * every place. Where a field is not available it will be omitted from the\n * response and you will not be charged for this data.\n *\n * ```js\n * import { getPlaceDetails } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const place = getPlaceDetails({\n * placeId: \"e78051acc722c55ab11ba930d8dd7772\",\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\");\n * });\n *\n * console.log(place);\n * ```\n */\nexport function getPlaceDetails(\n requestOptions: IGetPlaceOptions\n): Promise<IGetPlaceResponse> {\n const { placeId } = requestOptions;\n\n const options = appendCustomParams<IGetPlaceOptions>(\n requestOptions,\n [\"requestedFields\"],\n {\n ...requestOptions\n }\n );\n\n return request(`${baseUrl}/places/${placeId}`, {\n ...options,\n httpMethod: \"GET\"\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"categoriesGet\"][\"parameters\"][\"query\"],\n \"filter\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"categoriesGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode getCategories};\n */\nexport interface IGetCategoriesResponse extends successResponse {}\n\n/**\n * Options for {@linkcode getCategories}.\n */\nexport interface IGetCategoriesOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * The ArcGIS Places service has many categories (or types) of place, from\n * art museums to zoos. This endpoint returns all the categories including\n * their label and `categoryId`. The category Id can be used to search for\n * types of places with a `places/near-point` or `places/within-extent`\n * request.\n *\n * Categories also have information on their `parent`. This allows you to\n * search for specific categories such as \"French Restaurant\" - or to\n * look for more generic types such as \"Restaurant\".\n *\n * ```js\n * import { getCategories } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const response = await getCategories({\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\")\n * });\n *\n * console.log(response.categories);\n * ```\n */\nexport function getCategories(\n requestOptions: IGetCategoriesOptions\n): Promise<IGetCategoriesResponse> {\n const options = appendCustomParams<IGetCategoriesOptions>(\n requestOptions,\n [\"filter\"],\n {\n ...requestOptions\n }\n );\n\n return request(`${baseUrl}/categories`, {\n ...options,\n httpMethod: \"GET\"\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = operations[\"categoriesCategoryIdGet\"][\"parameters\"][\"query\"];\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"categoriesCategoryIdGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode getCategory};\n */\nexport interface IGetCategoryResponse extends successResponse {}\n\n/**\n * Options for {@linkcode getCategory}.\n */\nexport interface IGetCategoryOptions\n extends Omit<IRequestOptions, \"httpMethod\">,\n queryParams {\n categoryId: string;\n}\n\n/**\n * Returns details about a single category by Id.\n *\n * ```js\n * import { getCategories } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const response = getCategory({\n * categoryId: \"10000\",\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\");\n * });\n *\n * console.log(response);\n * ```\n **/\nexport function getCategory(\n requestOptions: IGetCategoryOptions\n): Promise<IGetCategoryResponse> {\n const { categoryId } = requestOptions;\n\n const options = appendCustomParams<IGetCategoryOptions>(requestOptions, [], {\n ...requestOptions\n });\n\n return request(`${baseUrl}/categories/${categoryId}`, {\n ...options,\n httpMethod: \"GET\"\n });\n}\n"],"names":[],"mappings":";;;;;;;AAAO,MAAM,OAAO,GAClB,sEAAsE,CAAC;SAEzD,WAAW,CAAC,QAAa;;IACvC,OAAO,CAAC,EAAC,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,0CAAE,IAAI,CAAA,CAAC;AACjC,CAAC;SAEe,iBAAiB,CAAC,aAAa,GAAG,CAAC,EAAE,eAAe,GAAG,EAAE;IACvE,OAAO;QACL,MAAM,EAAE,aAAa,GAAG,eAAe;QACvC,QAAQ,EAAE,eAAe;KAC1B,CAAC;AACJ;;ACsBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAsCgB,mBAAmB,CACjC,cAA2C;IAE3C,MAAM,OAAO,GAAG,kBAAkB,CAChC,cAAc,EACd,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,CAAC,oBAElE,cAAc,EAEpB,CAAC;IAEF,OACE,OAAO,CAAC,GAAG,OAAO,oBAAoB,kCACjC,OAAO,KACV,UAAU,EAAE,KAAK,IAEpB,CAAC,IAAI,CAAC,CAAC,QAAQ;QACd,MAAM,CAAC,qBACF,QAAQ,CACZ,CAAC;QAEF,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE;YACzB,CAAC,CAAC,QAAQ,GAAG;gBACX,MAAM,WAAW,mCACZ,cAAc,GACd,iBAAiB,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CACrE,CAAC;gBACF,OAAO,mBAAmB,CAAC,WAAW,CAAC,CAAC;aACzC,CAAC;SACH;QAED,OAAO,CAAC,CAAC;KACV,CAAC,CAAC;AACL;;AChEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAuCgB,sBAAsB,CACpC,cAA6C;IAE7C,MAAM,OAAO,GAAG,kBAAkB,CAChC,cAAc,EACd;QACE,MAAM;QACN,MAAM;QACN,MAAM;QACN,MAAM;QACN,aAAa;QACb,UAAU;QACV,QAAQ;QACR,YAAY;KACb,oBAEI,cAAc,EAEpB,CAAC;IAEF,OACE,OAAO,CAAC,GAAG,OAAO,uBAAuB,kCACpC,OAAO,KACV,UAAU,EAAE,KAAK,IAEpB,CAAC,IAAI,CAAC,CAAC,QAAQ;QACd,MAAM,CAAC,qBACF,QAAQ,CACZ,CAAC;QAEF,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE;YACzB,CAAC,CAAC,QAAQ,GAAG;gBACX,MAAM,WAAW,mCACZ,cAAc,GACd,iBAAiB,CAAC,cAAc,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,CACrE,CAAC;gBACF,OAAO,sBAAsB,CAAC,WAAW,CAAC,CAAC;aAC5C,CAAC;SACH;QACD,OAAO,CAAC,CAAC;KACV,CAAC,CAAC;AACL;;ACvFA;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA4BgB,eAAe,CAC7B,cAAgC;IAEhC,MAAM,EAAE,OAAO,EAAE,GAAG,cAAc,CAAC;IAEnC,MAAM,OAAO,GAAG,kBAAkB,CAChC,cAAc,EACd,CAAC,iBAAiB,CAAC,oBAEd,cAAc,EAEpB,CAAC;IAEF,OAAO,OAAO,CAAC,GAAG,OAAO,WAAW,OAAO,EAAE,kCACxC,OAAO,KACV,UAAU,EAAE,KAAK,IACjB,CAAC;AACL;;AC/CA;;;;;;;;;;;;;;;;;;;;;;SAsBgB,aAAa,CAC3B,cAAqC;IAErC,MAAM,OAAO,GAAG,kBAAkB,CAChC,cAAc,EACd,CAAC,QAAQ,CAAC,oBAEL,cAAc,EAEpB,CAAC;IAEF,OAAO,OAAO,CAAC,GAAG,OAAO,aAAa,kCACjC,OAAO,KACV,UAAU,EAAE,KAAK,IACjB,CAAC;AACL;;ACtCA;;;;;;;;;;;;;;;SAegB,WAAW,CACzB,cAAmC;IAEnC,MAAM,EAAE,UAAU,EAAE,GAAG,cAAc,CAAC;IAEtC,MAAM,OAAO,GAAG,kBAAkB,CAAsB,cAAc,EAAE,EAAE,oBACrE,cAAc,EACjB,CAAC;IAEH,OAAO,OAAO,CAAC,GAAG,OAAO,eAAe,UAAU,EAAE,kCAC/C,OAAO,KACV,UAAU,EAAE,KAAK,IACjB,CAAC;AACL;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/* @preserve
|
|
2
|
+
* @esri/arcgis-rest-places - v4.0.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2023 Esri, Inc.
|
|
4
|
+
* Thu May 04 2023 19:07:08 GMT+0000 (Coordinated Universal Time)
|
|
5
|
+
*/
|
|
6
|
+
import{appendCustomParams as e,request as t}from"@esri/arcgis-rest-request";const s="https://places-api.arcgis.com/arcgis/rest/services/places-service/v1";function n(e){var t;return!!(null===(t=null==e?void 0:e.links)||void 0===t?void 0:t.next)}function c(e=0,t=10){return{offset:e+t,pageSize:t}}function i(a){const r=e(a,["x","y","radius","categoryIds","pageSize","offset","searchText"],Object.assign({},a));return t(`${s}/places/near-point`,Object.assign(Object.assign({},r),{httpMethod:"GET"})).then((e=>{const t=Object.assign({},e);return n(e)&&(t.nextPage=()=>i(Object.assign(Object.assign({},a),c(a.offset,a.pageSize)))),t}))}function a(i){const r=e(i,["xmin","ymin","xmax","ymax","categoryIds","pageSize","offset","searchText"],Object.assign({},i));return t(`${s}/places/within-extent`,Object.assign(Object.assign({},r),{httpMethod:"GET"})).then((e=>{const t=Object.assign({},e);return n(e)&&(t.nextPage=()=>a(Object.assign(Object.assign({},i),c(i.offset,i.pageSize)))),t}))}function r(n){const{placeId:c}=n,i=e(n,["requestedFields"],Object.assign({},n));return t(`${s}/places/${c}`,Object.assign(Object.assign({},i),{httpMethod:"GET"}))}function o(n){const c=e(n,["filter"],Object.assign({},n));return t(`${s}/categories`,Object.assign(Object.assign({},c),{httpMethod:"GET"}))}function g(n){const{categoryId:c}=n,i=e(n,[],Object.assign({},n));return t(`${s}/categories/${c}`,Object.assign(Object.assign({},i),{httpMethod:"GET"}))}export{i as findPlacesNearPoint,a as findPlacesWithinExtent,o as getCategories,g as getCategory,r as getPlaceDetails};
|
|
7
|
+
//# sourceMappingURL=places.esm.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"places.esm.min.js","sources":["../../src/utils.ts","../../src/findPlacesNearPoint.ts","../../src/findPlacesWithinExtent.ts","../../src/getPlaceDetails.ts","../../src/getCategories.ts","../../src/getCategory.ts"],"sourcesContent":["export const baseUrl =\n \"https://places-api.arcgis.com/arcgis/rest/services/places-service/v1\";\n\nexport function hasNextPage(response: any) {\n return !!response?.links?.next;\n}\n\nexport function getNextPageParams(currentOffset = 0, currentPageSize = 10) {\n return {\n offset: currentOffset + currentPageSize,\n pageSize: currentPageSize\n };\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl, hasNextPage, getNextPageParams } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"nearPointGet\"][\"parameters\"][\"query\"],\n \"x\" | \"y\" | \"radius\" | \"categoryIds\" | \"pageSize\" | \"offset\" | \"searchText\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"nearPointGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findPlacesNearPoint};\n */\nexport interface IFindPlacesNearPointResponse extends successResponse {\n nextPage?: () => Promise<IFindPlacesNearPointResponse>;\n}\n\n/**\n * Options for {@linkcode findPlacesNearPoint}.\n */\nexport interface IFindPlacesNearPointOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * Searches places that are within a given radius of a geographic point.\n * You must supply the `x` and `y` coordinates of the point that you wish\n * to search from. You can either specify a search radius, or use the\n * default (500 meters). You could use this method to search for places\n * around a user's GPS position, or a location clicked on a map.\n *\n * The returned places contain basic data such as name, category and\n * location. You can use the {@linkcode getPlace} method to get additional\n * details for a given place.\n *\n * You can refine the results by supplying additional search parameters,\n * including:\n *\n * - A list of category Ids, see {@linkcode searchCategories} or {@linkcode getCategories}.\n * - A partial name filter with `name` option\n *\n * As this request can return many results, pagination is supported.\n * Regardless of paging, the maximum number of places that can be returned\n * by a single query is `200`. When a query results in more than `200`\n * places, the response will contain the property\n * `\"maxResultsExceeded\":true` in addition to place results. If `maxResultsExceeded`\n * is true an additional method `response.nextPage()` can be used to get the next page of results.\n *\n * ```js\n * import { findPlacesNearPoint } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const response = await findPlacesNearPoint({\n * x: -3.1883,\n * y: 55.9533,\n * radius: 100,\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\");\n * });\n *\n * console.log(response);\n * ```\n */\nexport function findPlacesNearPoint(\n requestOptions: IFindPlacesNearPointOptions\n): Promise<IFindPlacesNearPointResponse> {\n const options = appendCustomParams<IFindPlacesNearPointOptions>(\n requestOptions,\n [\"x\", \"y\", \"radius\", \"categoryIds\", \"pageSize\", \"offset\", \"searchText\"],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/places/near-point`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindPlacesNearPointResponse = {\n ...response\n };\n\n if (hasNextPage(response)) {\n r.nextPage = () => {\n const nextOptions = {\n ...requestOptions,\n ...getNextPageParams(requestOptions.offset, requestOptions.pageSize)\n };\n return findPlacesNearPoint(nextOptions);\n };\n }\n\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl, hasNextPage, getNextPageParams } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"withinExtentGet\"][\"parameters\"][\"query\"],\n | \"xmin\"\n | \"ymin\"\n | \"xmax\"\n | \"ymax\"\n | \"categoryIds\"\n | \"pageSize\"\n | \"offset\"\n | \"searchText\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"withinExtentGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode findPlacesWithinExtent};\n */\nexport interface IFindPlacesWithinExtentResponse extends successResponse {\n nextPage?: () => Promise<IFindPlacesWithinExtentResponse>;\n}\n\n/**\n * Options for {@linkcode findPlacesNearPoint}.\n */\nexport interface IFindPlaceWithinExtentOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * Searches the world-wide set of places for those that are within an\n * extent, or bounding box. You must supply the `xmin`, `ymin`, `xmax` and\n * `ymax` coordinates of the extent. You could use this endpoint to search\n * for places in the visible extent of a user's screen.\n *\n * The returned places contain basic data such as name, category and\n * location. You can use the {@linkcode getPlace} method to get additional\n * details for a given place.\n *\n * You can also refine the results by supplying additional search parameters,\n * including:\n *\n * - A list of category Ids, see {@linkcode searchCategories} or {@linkcode getCategories}.\n * - A partial name filter with `name` option\n *\n * As this request can return many results, pagination is supported.\n * Regardless of paging, the maximum number of places that can be returned\n * by a single query is `200`. When a query results in more than `200`\n * places, the response will contain the property\n * `\"maxResultsExceeded\":true` in addition to place results. If `maxResultsExceeded`\n * is true an additional method `response.nextPage()` can be used to get the next page of results.\n *\n * ```\n * import { findPlacesWithinExtent } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const results = await findPlacesWithinExtent({\n * xmin: -118.013334,\n * ymin: 33.78193,\n * xmax: -117.795753,\n * ymax: 33.873337,\n * categoryIds: [\"13002\"],\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\");\n * });\n *\n * console.log(results)\n * ```\n */\nexport function findPlacesWithinExtent(\n requestOptions: IFindPlaceWithinExtentOptions\n): Promise<IFindPlacesWithinExtentResponse> {\n const options = appendCustomParams<IFindPlaceWithinExtentOptions>(\n requestOptions,\n [\n \"xmin\",\n \"ymin\",\n \"xmax\",\n \"ymax\",\n \"categoryIds\",\n \"pageSize\",\n \"offset\",\n \"searchText\"\n ],\n {\n ...requestOptions\n }\n );\n\n return (\n request(`${baseUrl}/places/within-extent`, {\n ...options,\n httpMethod: \"GET\"\n }) as Promise<successResponse>\n ).then((response) => {\n const r: IFindPlacesWithinExtentResponse = {\n ...response\n };\n\n if (hasNextPage(response)) {\n r.nextPage = () => {\n const nextOptions = {\n ...requestOptions,\n ...getNextPageParams(requestOptions.offset, requestOptions.pageSize)\n };\n return findPlacesWithinExtent(nextOptions);\n };\n }\n return r;\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"placeIdGet\"][\"parameters\"][\"query\"],\n \"requestedFields\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"placeIdGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode getPlace};\n */\nexport interface IGetPlaceResponse extends successResponse {}\n\n/**\n * Options for {@linkcode getPlace}.\n */\nexport interface IGetPlaceOptions\n extends Omit<IRequestOptions, \"httpMethod\">,\n queryParams {\n placeId: string;\n}\n\n/**\n * Returns a single place, including additional details, such as:\n *\n * - contact details\n * - address\n * - price information\n * - user rating\n * - opening hours\n *\n * This endpoint can be used to fetch additional details for a specific\n * place, returned from a places search request.\n *\n * Note that some fields, such as opening hours, are not available for\n * every place. Where a field is not available it will be omitted from the\n * response and you will not be charged for this data.\n *\n * ```js\n * import { getPlaceDetails } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const place = getPlaceDetails({\n * placeId: \"e78051acc722c55ab11ba930d8dd7772\",\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\");\n * });\n *\n * console.log(place);\n * ```\n */\nexport function getPlaceDetails(\n requestOptions: IGetPlaceOptions\n): Promise<IGetPlaceResponse> {\n const { placeId } = requestOptions;\n\n const options = appendCustomParams<IGetPlaceOptions>(\n requestOptions,\n [\"requestedFields\"],\n {\n ...requestOptions\n }\n );\n\n return request(`${baseUrl}/places/${placeId}`, {\n ...options,\n httpMethod: \"GET\"\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = Pick<\n operations[\"categoriesGet\"][\"parameters\"][\"query\"],\n \"filter\"\n>;\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"categoriesGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode getCategories};\n */\nexport interface IGetCategoriesResponse extends successResponse {}\n\n/**\n * Options for {@linkcode getCategories}.\n */\nexport interface IGetCategoriesOptions\n extends Omit<IRequestOptions, \"httpMethod\" | \"f\">,\n queryParams {}\n\n/**\n * The ArcGIS Places service has many categories (or types) of place, from\n * art museums to zoos. This endpoint returns all the categories including\n * their label and `categoryId`. The category Id can be used to search for\n * types of places with a `places/near-point` or `places/within-extent`\n * request.\n *\n * Categories also have information on their `parent`. This allows you to\n * search for specific categories such as \"French Restaurant\" - or to\n * look for more generic types such as \"Restaurant\".\n *\n * ```js\n * import { getCategories } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const response = await getCategories({\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\")\n * });\n *\n * console.log(response.categories);\n * ```\n */\nexport function getCategories(\n requestOptions: IGetCategoriesOptions\n): Promise<IGetCategoriesResponse> {\n const options = appendCustomParams<IGetCategoriesOptions>(\n requestOptions,\n [\"filter\"],\n {\n ...requestOptions\n }\n );\n\n return request(`${baseUrl}/categories`, {\n ...options,\n httpMethod: \"GET\"\n });\n}\n","import {\n request,\n appendCustomParams,\n IRequestOptions\n} from \"@esri/arcgis-rest-request\";\n\nimport { operations } from \"./openapi-types.js\";\nimport { baseUrl } from \"./utils.js\";\n\n// determine the list of allowed params we want to allow as options\n// this should match the array given to appendCustomParams below\ntype queryParams = operations[\"categoriesCategoryIdGet\"][\"parameters\"][\"query\"];\n\n// get the correct type of the response format\ntype successResponse =\n operations[\"categoriesCategoryIdGet\"][\"responses\"][\"200\"][\"content\"][\"application/json\"];\n\n/**\n * The response format for {@linkcode getCategory};\n */\nexport interface IGetCategoryResponse extends successResponse {}\n\n/**\n * Options for {@linkcode getCategory}.\n */\nexport interface IGetCategoryOptions\n extends Omit<IRequestOptions, \"httpMethod\">,\n queryParams {\n categoryId: string;\n}\n\n/**\n * Returns details about a single category by Id.\n *\n * ```js\n * import { getCategories } from \"@esri/arcgis-rest-places\";\n * import { ApiKeyManager } from \"@esri/arcgis-rest-request\";\n *\n * const response = getCategory({\n * categoryId: \"10000\",\n * authentication: ApiKeyManager.fromKey(\"YOUR_API_KEY\");\n * });\n *\n * console.log(response);\n * ```\n **/\nexport function getCategory(\n requestOptions: IGetCategoryOptions\n): Promise<IGetCategoryResponse> {\n const { categoryId } = requestOptions;\n\n const options = appendCustomParams<IGetCategoryOptions>(requestOptions, [], {\n ...requestOptions\n });\n\n return request(`${baseUrl}/categories/${categoryId}`, {\n ...options,\n httpMethod: \"GET\"\n });\n}\n"],"names":["baseUrl","hasNextPage","response","links","next","getNextPageParams","currentOffset","currentPageSize","offset","pageSize","findPlacesNearPoint","requestOptions","options","appendCustomParams","request","httpMethod","then","r","nextPage","findPlacesWithinExtent","getPlaceDetails","placeId","getCategories","getCategory","categoryId"],"mappings":";;;;;4EAAO,MAAMA,EACX,gFAEcC,EAAYC,SAC1B,mBAASA,eAAAA,EAAUC,4BAAOC,KAC5B,UAEgBC,EAAkBC,EAAgB,EAAGC,EAAkB,IACrE,MAAO,CACLC,OAAQF,EAAgBC,EACxBE,SAAUF,EAEd,UC4DgBG,EACdC,GAEA,MAAMC,EAAUC,EACdF,EACA,CAAC,IAAK,IAAK,SAAU,cAAe,WAAY,SAAU,+BAErDA,IAIP,OACEG,EAAQ,GAAGd,qDACNY,IACHG,WAAY,SAEdC,MAAMd,IACN,MAAMe,mBACDf,GAaL,OAVID,EAAYC,KACde,EAAEC,SAAW,IAKJR,iCAHFC,GACAN,EAAkBM,EAAeH,OAAQG,EAAeF,aAM1DQ,CAAC,GAEZ,UCzBgBE,EACdR,GAEA,MAAMC,EAAUC,EACdF,EACA,CACE,OACA,OACA,OACA,OACA,cACA,WACA,SACA,+BAGGA,IAIP,OACEG,EAAQ,GAAGd,wDACNY,IACHG,WAAY,SAEdC,MAAMd,IACN,MAAMe,mBACDf,GAYL,OATID,EAAYC,KACde,EAAEC,SAAW,IAKJC,iCAHFR,GACAN,EAAkBM,EAAeH,OAAQG,EAAeF,aAK1DQ,CAAC,GAEZ,UC3DgBG,EACdT,GAEA,MAAMU,QAAEA,GAAYV,EAEdC,EAAUC,EACdF,EACA,CAAC,oCAEIA,IAIP,OAAOG,EAAQ,GAAGd,YAAkBqB,mCAC/BT,IACHG,WAAY,QAEhB,UCzBgBO,EACdX,GAEA,MAAMC,EAAUC,EACdF,EACA,CAAC,2BAEIA,IAIP,OAAOG,EAAQ,GAAGd,8CACbY,IACHG,WAAY,QAEhB,UCvBgBQ,EACdZ,GAEA,MAAMa,WAAEA,GAAeb,EAEjBC,EAAUC,EAAwCF,EAAgB,oBACnEA,IAGL,OAAOG,EAAQ,GAAGd,gBAAsBwB,mCACnCZ,IACHG,WAAY,QAEhB"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/* @preserve
|
|
2
|
+
* @esri/arcgis-rest-places - v4.0.0 - Apache-2.0
|
|
3
|
+
* Copyright (c) 2017-2023 Esri, Inc.
|
|
4
|
+
* Thu May 04 2023 19:07:08 GMT+0000 (Coordinated Universal Time)
|
|
5
|
+
*/
|
|
6
|
+
(function (global, factory) {
|
|
7
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@esri/arcgis-rest-request')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(['exports', '@esri/arcgis-rest-request'], factory) :
|
|
9
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.arcgisRest = global.arcgisRest || {}, global.arcgisRest));
|
|
10
|
+
})(this, (function (exports, arcgisRestRequest) { 'use strict';
|
|
11
|
+
|
|
12
|
+
const baseUrl = "https://places-api.arcgis.com/arcgis/rest/services/places-service/v1";
|
|
13
|
+
function hasNextPage(response) {
|
|
14
|
+
var _a;
|
|
15
|
+
return !!((_a = response === null || response === void 0 ? void 0 : response.links) === null || _a === void 0 ? void 0 : _a.next);
|
|
16
|
+
}
|
|
17
|
+
function getNextPageParams(currentOffset = 0, currentPageSize = 10) {
|
|
18
|
+
return {
|
|
19
|
+
offset: currentOffset + currentPageSize,
|
|
20
|
+
pageSize: currentPageSize
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Searches places that are within a given radius of a geographic point.
|
|
26
|
+
* You must supply the `x` and `y` coordinates of the point that you wish
|
|
27
|
+
* to search from. You can either specify a search radius, or use the
|
|
28
|
+
* default (500 meters). You could use this method to search for places
|
|
29
|
+
* around a user's GPS position, or a location clicked on a map.
|
|
30
|
+
*
|
|
31
|
+
* The returned places contain basic data such as name, category and
|
|
32
|
+
* location. You can use the {@linkcode getPlace} method to get additional
|
|
33
|
+
* details for a given place.
|
|
34
|
+
*
|
|
35
|
+
* You can refine the results by supplying additional search parameters,
|
|
36
|
+
* including:
|
|
37
|
+
*
|
|
38
|
+
* - A list of category Ids, see {@linkcode searchCategories} or {@linkcode getCategories}.
|
|
39
|
+
* - A partial name filter with `name` option
|
|
40
|
+
*
|
|
41
|
+
* As this request can return many results, pagination is supported.
|
|
42
|
+
* Regardless of paging, the maximum number of places that can be returned
|
|
43
|
+
* by a single query is `200`. When a query results in more than `200`
|
|
44
|
+
* places, the response will contain the property
|
|
45
|
+
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded`
|
|
46
|
+
* is true an additional method `response.nextPage()` can be used to get the next page of results.
|
|
47
|
+
*
|
|
48
|
+
* ```js
|
|
49
|
+
* import { findPlacesNearPoint } from "@esri/arcgis-rest-places";
|
|
50
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
51
|
+
*
|
|
52
|
+
* const response = await findPlacesNearPoint({
|
|
53
|
+
* x: -3.1883,
|
|
54
|
+
* y: 55.9533,
|
|
55
|
+
* radius: 100,
|
|
56
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY");
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* console.log(response);
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
function findPlacesNearPoint(requestOptions) {
|
|
63
|
+
const options = arcgisRestRequest.appendCustomParams(requestOptions, ["x", "y", "radius", "categoryIds", "pageSize", "offset", "searchText"], Object.assign({}, requestOptions));
|
|
64
|
+
return arcgisRestRequest.request(`${baseUrl}/places/near-point`, Object.assign(Object.assign({}, options), { httpMethod: "GET" })).then((response) => {
|
|
65
|
+
const r = Object.assign({}, response);
|
|
66
|
+
if (hasNextPage(response)) {
|
|
67
|
+
r.nextPage = () => {
|
|
68
|
+
const nextOptions = Object.assign(Object.assign({}, requestOptions), getNextPageParams(requestOptions.offset, requestOptions.pageSize));
|
|
69
|
+
return findPlacesNearPoint(nextOptions);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return r;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Searches the world-wide set of places for those that are within an
|
|
78
|
+
* extent, or bounding box. You must supply the `xmin`, `ymin`, `xmax` and
|
|
79
|
+
* `ymax` coordinates of the extent. You could use this endpoint to search
|
|
80
|
+
* for places in the visible extent of a user's screen.
|
|
81
|
+
*
|
|
82
|
+
* The returned places contain basic data such as name, category and
|
|
83
|
+
* location. You can use the {@linkcode getPlace} method to get additional
|
|
84
|
+
* details for a given place.
|
|
85
|
+
*
|
|
86
|
+
* You can also refine the results by supplying additional search parameters,
|
|
87
|
+
* including:
|
|
88
|
+
*
|
|
89
|
+
* - A list of category Ids, see {@linkcode searchCategories} or {@linkcode getCategories}.
|
|
90
|
+
* - A partial name filter with `name` option
|
|
91
|
+
*
|
|
92
|
+
* As this request can return many results, pagination is supported.
|
|
93
|
+
* Regardless of paging, the maximum number of places that can be returned
|
|
94
|
+
* by a single query is `200`. When a query results in more than `200`
|
|
95
|
+
* places, the response will contain the property
|
|
96
|
+
* `"maxResultsExceeded":true` in addition to place results. If `maxResultsExceeded`
|
|
97
|
+
* is true an additional method `response.nextPage()` can be used to get the next page of results.
|
|
98
|
+
*
|
|
99
|
+
* ```
|
|
100
|
+
* import { findPlacesWithinExtent } from "@esri/arcgis-rest-places";
|
|
101
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
102
|
+
*
|
|
103
|
+
* const results = await findPlacesWithinExtent({
|
|
104
|
+
* xmin: -118.013334,
|
|
105
|
+
* ymin: 33.78193,
|
|
106
|
+
* xmax: -117.795753,
|
|
107
|
+
* ymax: 33.873337,
|
|
108
|
+
* categoryIds: ["13002"],
|
|
109
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY");
|
|
110
|
+
* });
|
|
111
|
+
*
|
|
112
|
+
* console.log(results)
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
function findPlacesWithinExtent(requestOptions) {
|
|
116
|
+
const options = arcgisRestRequest.appendCustomParams(requestOptions, [
|
|
117
|
+
"xmin",
|
|
118
|
+
"ymin",
|
|
119
|
+
"xmax",
|
|
120
|
+
"ymax",
|
|
121
|
+
"categoryIds",
|
|
122
|
+
"pageSize",
|
|
123
|
+
"offset",
|
|
124
|
+
"searchText"
|
|
125
|
+
], Object.assign({}, requestOptions));
|
|
126
|
+
return arcgisRestRequest.request(`${baseUrl}/places/within-extent`, Object.assign(Object.assign({}, options), { httpMethod: "GET" })).then((response) => {
|
|
127
|
+
const r = Object.assign({}, response);
|
|
128
|
+
if (hasNextPage(response)) {
|
|
129
|
+
r.nextPage = () => {
|
|
130
|
+
const nextOptions = Object.assign(Object.assign({}, requestOptions), getNextPageParams(requestOptions.offset, requestOptions.pageSize));
|
|
131
|
+
return findPlacesWithinExtent(nextOptions);
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
return r;
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Returns a single place, including additional details, such as:
|
|
140
|
+
*
|
|
141
|
+
* - contact details
|
|
142
|
+
* - address
|
|
143
|
+
* - price information
|
|
144
|
+
* - user rating
|
|
145
|
+
* - opening hours
|
|
146
|
+
*
|
|
147
|
+
* This endpoint can be used to fetch additional details for a specific
|
|
148
|
+
* place, returned from a places search request.
|
|
149
|
+
*
|
|
150
|
+
* Note that some fields, such as opening hours, are not available for
|
|
151
|
+
* every place. Where a field is not available it will be omitted from the
|
|
152
|
+
* response and you will not be charged for this data.
|
|
153
|
+
*
|
|
154
|
+
* ```js
|
|
155
|
+
* import { getPlaceDetails } from "@esri/arcgis-rest-places";
|
|
156
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
157
|
+
*
|
|
158
|
+
* const place = getPlaceDetails({
|
|
159
|
+
* placeId: "e78051acc722c55ab11ba930d8dd7772",
|
|
160
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY");
|
|
161
|
+
* });
|
|
162
|
+
*
|
|
163
|
+
* console.log(place);
|
|
164
|
+
* ```
|
|
165
|
+
*/
|
|
166
|
+
function getPlaceDetails(requestOptions) {
|
|
167
|
+
const { placeId } = requestOptions;
|
|
168
|
+
const options = arcgisRestRequest.appendCustomParams(requestOptions, ["requestedFields"], Object.assign({}, requestOptions));
|
|
169
|
+
return arcgisRestRequest.request(`${baseUrl}/places/${placeId}`, Object.assign(Object.assign({}, options), { httpMethod: "GET" }));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* The ArcGIS Places service has many categories (or types) of place, from
|
|
174
|
+
* art museums to zoos. This endpoint returns all the categories including
|
|
175
|
+
* their label and `categoryId`. The category Id can be used to search for
|
|
176
|
+
* types of places with a `places/near-point` or `places/within-extent`
|
|
177
|
+
* request.
|
|
178
|
+
*
|
|
179
|
+
* Categories also have information on their `parent`. This allows you to
|
|
180
|
+
* search for specific categories such as "French Restaurant" - or to
|
|
181
|
+
* look for more generic types such as "Restaurant".
|
|
182
|
+
*
|
|
183
|
+
* ```js
|
|
184
|
+
* import { getCategories } from "@esri/arcgis-rest-places";
|
|
185
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
186
|
+
*
|
|
187
|
+
* const response = await getCategories({
|
|
188
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY")
|
|
189
|
+
* });
|
|
190
|
+
*
|
|
191
|
+
* console.log(response.categories);
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
function getCategories(requestOptions) {
|
|
195
|
+
const options = arcgisRestRequest.appendCustomParams(requestOptions, ["filter"], Object.assign({}, requestOptions));
|
|
196
|
+
return arcgisRestRequest.request(`${baseUrl}/categories`, Object.assign(Object.assign({}, options), { httpMethod: "GET" }));
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Returns details about a single category by Id.
|
|
201
|
+
*
|
|
202
|
+
* ```js
|
|
203
|
+
* import { getCategories } from "@esri/arcgis-rest-places";
|
|
204
|
+
* import { ApiKeyManager } from "@esri/arcgis-rest-request";
|
|
205
|
+
*
|
|
206
|
+
* const response = getCategory({
|
|
207
|
+
* categoryId: "10000",
|
|
208
|
+
* authentication: ApiKeyManager.fromKey("YOUR_API_KEY");
|
|
209
|
+
* });
|
|
210
|
+
*
|
|
211
|
+
* console.log(response);
|
|
212
|
+
* ```
|
|
213
|
+
**/
|
|
214
|
+
function getCategory(requestOptions) {
|
|
215
|
+
const { categoryId } = requestOptions;
|
|
216
|
+
const options = arcgisRestRequest.appendCustomParams(requestOptions, [], Object.assign({}, requestOptions));
|
|
217
|
+
return arcgisRestRequest.request(`${baseUrl}/categories/${categoryId}`, Object.assign(Object.assign({}, options), { httpMethod: "GET" }));
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
exports.findPlacesNearPoint = findPlacesNearPoint;
|
|
221
|
+
exports.findPlacesWithinExtent = findPlacesWithinExtent;
|
|
222
|
+
exports.getCategories = getCategories;
|
|
223
|
+
exports.getCategory = getCategory;
|
|
224
|
+
exports.getPlaceDetails = getPlaceDetails;
|
|
225
|
+
|
|
226
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
227
|
+
|
|
228
|
+
}));
|
|
229
|
+
//# sourceMappingURL=places.umd.js.map
|