@nextgis/geocoder 1.16.7 → 1.17.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.
@@ -1,4 +1,4 @@
1
- /** Bundle of @nextgis/geocoder; version: 1.16.7; author: NextGIS */
1
+ /** Bundle of @nextgis/geocoder; version: 1.17.0; author: NextGIS */
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -12,452 +12,203 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
12
12
  var CancelablePromise__default = /*#__PURE__*/_interopDefaultLegacy(CancelablePromise);
13
13
  var NgwConnector__default = /*#__PURE__*/_interopDefaultLegacy(NgwConnector);
14
14
 
15
- /******************************************************************************
16
- Copyright (c) Microsoft Corporation.
17
-
18
- Permission to use, copy, modify, and/or distribute this software for any
19
- purpose with or without fee is hereby granted.
20
-
21
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
22
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
23
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
24
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
25
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
26
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
27
- PERFORMANCE OF THIS SOFTWARE.
28
- ***************************************************************************** */
29
- /* global Reflect, Promise */
30
-
31
- var extendStatics = function(d, b) {
32
- extendStatics = Object.setPrototypeOf ||
33
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
34
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
35
- return extendStatics(d, b);
36
- };
37
-
38
- function __extends(d, b) {
39
- if (typeof b !== "function" && b !== null)
40
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
41
- extendStatics(d, b);
42
- function __() { this.constructor = d; }
43
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
44
- }
45
-
46
- var __assign = function() {
47
- __assign = Object.assign || function __assign(t) {
48
- for (var s, i = 1, n = arguments.length; i < n; i++) {
49
- s = arguments[i];
50
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
51
- }
52
- return t;
53
- };
54
- return __assign.apply(this, arguments);
55
- };
56
-
57
- function __generator(thisArg, body) {
58
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
59
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
60
- function verb(n) { return function (v) { return step([n, v]); }; }
61
- function step(op) {
62
- if (f) throw new TypeError("Generator is already executing.");
63
- while (_) try {
64
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
65
- if (y = 0, t) op = [op[0] & 2, t.value];
66
- switch (op[0]) {
67
- case 0: case 1: t = op; break;
68
- case 4: _.label++; return { value: op[1], done: false };
69
- case 5: _.label++; y = op[1]; op = [0]; continue;
70
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
71
- default:
72
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
73
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
74
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
75
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
76
- if (t[2]) _.ops.pop();
77
- _.trys.pop(); continue;
78
- }
79
- op = body.call(thisArg, _);
80
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
81
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
82
- }
83
- }
84
-
85
- function __values(o) {
86
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
87
- if (m) return m.call(o);
88
- if (o && typeof o.length === "number") return {
89
- next: function () {
90
- if (o && i >= o.length) o = void 0;
91
- return { value: o && o[i++], done: !o };
92
- }
93
- };
94
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
95
- }
96
-
97
- function __await(v) {
98
- return this instanceof __await ? (this.v = v, this) : new __await(v);
99
- }
100
-
101
- function __asyncGenerator(thisArg, _arguments, generator) {
102
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
103
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
104
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
105
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
106
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
107
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
108
- function fulfill(value) { resume("next", value); }
109
- function reject(value) { resume("throw", value); }
110
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
111
- }
112
-
113
- function __asyncValues(o) {
114
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
115
- var m = o[Symbol.asyncIterator], i;
116
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
117
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
118
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
15
+ class BaseGeocoder {
16
+ constructor(options) {
17
+ if (options) {
18
+ utils.objectAssign(this, options);
19
+ }
20
+ }
119
21
  }
120
22
 
121
- var BaseGeocoder = /** @class */ (function () {
122
- function BaseGeocoder(options) {
123
- if (options) {
124
- utils.objectAssign(this, options);
125
- }
126
- }
127
- return BaseGeocoder;
128
- }());
129
-
130
- var ID = 0;
131
- var Geocoder = /** @class */ (function (_super) {
132
- __extends(Geocoder, _super);
133
- function Geocoder(options) {
134
- var _this = _super.call(this, options) || this;
135
- _this.providers = [];
136
- if (options && options.providers) {
137
- _this.providers = options.providers;
138
- }
139
- return _this;
140
- }
141
- Geocoder.prototype.abort = function () {
142
- this.providers.forEach(function (x) {
143
- if (x.abort) {
144
- x.abort();
145
- }
146
- });
147
- };
148
- Geocoder.prototype.search = function (query) {
149
- return __asyncGenerator(this, arguments, function search_1() {
150
- var _i, _a, provider, results, results_1, results_1_1, r, e_1_1;
151
- var e_1, _b;
152
- return __generator(this, function (_c) {
153
- switch (_c.label) {
154
- case 0:
155
- _i = 0, _a = this.providers;
156
- _c.label = 1;
157
- case 1:
158
- if (!(_i < _a.length)) return [3 /*break*/, 19];
159
- provider = _a[_i];
160
- _c.label = 2;
161
- case 2:
162
- _c.trys.push([2, 17, , 18]);
163
- results = provider.search(query);
164
- _c.label = 3;
165
- case 3:
166
- _c.trys.push([3, 10, 11, 16]);
167
- results_1 = (e_1 = void 0, __asyncValues(results));
168
- _c.label = 4;
169
- case 4: return [4 /*yield*/, __await(results_1.next())];
170
- case 5:
171
- if (!(results_1_1 = _c.sent(), !results_1_1.done)) return [3 /*break*/, 9];
172
- r = results_1_1.value;
173
- return [4 /*yield*/, __await(__assign(__assign({}, r), { provider: provider, _id: ID++ }))];
174
- case 6: return [4 /*yield*/, _c.sent()];
175
- case 7:
176
- _c.sent();
177
- _c.label = 8;
178
- case 8: return [3 /*break*/, 4];
179
- case 9: return [3 /*break*/, 16];
180
- case 10:
181
- e_1_1 = _c.sent();
182
- e_1 = { error: e_1_1 };
183
- return [3 /*break*/, 16];
184
- case 11:
185
- _c.trys.push([11, , 14, 15]);
186
- if (!(results_1_1 && !results_1_1.done && (_b = results_1.return))) return [3 /*break*/, 13];
187
- return [4 /*yield*/, __await(_b.call(results_1))];
188
- case 12:
189
- _c.sent();
190
- _c.label = 13;
191
- case 13: return [3 /*break*/, 15];
192
- case 14:
193
- if (e_1) throw e_1.error;
194
- return [7 /*endfinally*/];
195
- case 15: return [7 /*endfinally*/];
196
- case 16: return [3 /*break*/, 18];
197
- case 17:
198
- _c.sent();
199
- return [3 /*break*/, 18];
200
- case 18:
201
- _i++;
202
- return [3 /*break*/, 1];
203
- case 19: return [2 /*return*/];
204
- }
205
- });
206
- });
207
- };
208
- Geocoder.prototype.result = function (item) {
209
- if (item.provider) {
210
- return item.provider.result(item);
211
- }
212
- return CancelablePromise__default.resolve(undefined);
213
- };
214
- return Geocoder;
215
- }(BaseGeocoder));
23
+ let ID = 0;
24
+ class Geocoder extends BaseGeocoder {
25
+ constructor(options) {
26
+ super(options);
27
+ this.providers = [];
28
+ if (options && options.providers) {
29
+ this.providers = options.providers;
30
+ }
31
+ }
32
+ abort() {
33
+ this.providers.forEach((x) => {
34
+ if (x.abort) {
35
+ x.abort();
36
+ }
37
+ });
38
+ }
39
+ async *search(query) {
40
+ for (const provider of this.providers) {
41
+ try {
42
+ const results = provider.search(query);
43
+ for await (const r of results) {
44
+ yield { ...r, provider, _id: ID++ };
45
+ }
46
+ }
47
+ catch (er) {
48
+ //
49
+ }
50
+ }
51
+ }
52
+ result(item) {
53
+ if (item.provider) {
54
+ return item.provider.result(item);
55
+ }
56
+ return CancelablePromise__default.resolve(undefined);
57
+ }
58
+ }
216
59
 
217
- var BaseProvider = /** @class */ (function (_super) {
218
- __extends(BaseProvider, _super);
219
- function BaseProvider() {
220
- return _super !== null && _super.apply(this, arguments) || this;
221
- }
222
- return BaseProvider;
223
- }(BaseGeocoder));
60
+ class BaseProvider extends BaseGeocoder {
61
+ }
224
62
 
225
- var NgwProvider = /** @class */ (function (_super) {
226
- __extends(NgwProvider, _super);
227
- function NgwProvider(options) {
228
- var _this = _super.call(this, options) || this;
229
- _this.caseInsensitive = true;
230
- _this.searchUrl = 'https://maxim.nextgis.com';
231
- _this.searchResources = [];
232
- _this.requests = [];
233
- _this.connector =
234
- options.connector ||
235
- new NgwConnector__default({
236
- baseUrl: _this.searchUrl,
237
- });
238
- _this.searchResources = options.searchResources;
239
- return _this;
240
- }
241
- NgwProvider.prototype.abort = function () {
242
- this.requests.forEach(function (x) {
243
- x.cancel();
244
- });
245
- this.requests = [];
246
- };
247
- NgwProvider.prototype.search = function (like) {
248
- return __asyncGenerator(this, arguments, function search_1() {
249
- var _loop_1, this_1, _i, _a, resource;
250
- var _this = this;
251
- return __generator(this, function (_b) {
252
- switch (_b.label) {
253
- case 0:
254
- _loop_1 = function (resource) {
255
- var limit, request, resp, entries, _loop_2, _c, _d, item;
256
- return __generator(this, function (_e) {
257
- switch (_e.label) {
258
- case 0:
259
- limit = resource.limit || 300;
260
- request = this_1.connector.get('feature_layer.store', {
261
- headers: { RANGE: "items=0-".concat(limit) },
262
- }, {
263
- id: resource.id,
264
- like: like,
265
- });
266
- this_1.requests.push(request);
267
- request.catch(function (er) {
268
- console.warn(er);
269
- });
270
- return [4 /*yield*/, __await(request)];
271
- case 1:
272
- resp = _e.sent();
273
- entries = [];
274
- if (resp) {
275
- resp.forEach(function (x) {
276
- entries.push(__assign({ query: like, resourceId: resource.id }, x));
277
- });
278
- }
279
- _loop_2 = function (item) {
280
- return __generator(this, function (_f) {
281
- switch (_f.label) {
282
- case 0:
283
- item.result = function () { return _this.result(item); };
284
- return [4 /*yield*/, __await(item)];
285
- case 1: return [4 /*yield*/, _f.sent()];
286
- case 2:
287
- _f.sent();
288
- return [2 /*return*/];
289
- }
290
- });
291
- };
292
- _c = 0, _d = this_1._items(entries);
293
- _e.label = 2;
294
- case 2:
295
- if (!(_c < _d.length)) return [3 /*break*/, 5];
296
- item = _d[_c];
297
- return [5 /*yield**/, _loop_2(item)];
298
- case 3:
299
- _e.sent();
300
- _e.label = 4;
301
- case 4:
302
- _c++;
303
- return [3 /*break*/, 2];
304
- case 5: return [2 /*return*/];
305
- }
306
- });
307
- };
308
- this_1 = this;
309
- _i = 0, _a = this.searchResources;
310
- _b.label = 1;
311
- case 1:
312
- if (!(_i < _a.length)) return [3 /*break*/, 4];
313
- resource = _a[_i];
314
- return [5 /*yield**/, _loop_1(resource)];
315
- case 2:
316
- _b.sent();
317
- _b.label = 3;
318
- case 3:
319
- _i++;
320
- return [3 /*break*/, 1];
321
- case 4: return [2 /*return*/];
322
- }
323
- });
324
- });
325
- };
326
- NgwProvider.prototype.result = function (item) {
327
- var req = this.connector
328
- .get('feature_layer.feature.item_extent', null, {
329
- id: item.resourceId,
330
- fid: item.featureId,
331
- })
332
- .then(function (x) {
333
- var e = x.extent;
334
- return {
335
- text: item.text,
336
- extent: [e.minLon, e.minLat, e.maxLon, e.maxLat],
337
- };
338
- });
339
- this.requests.push(req);
340
- return req;
341
- };
342
- NgwProvider.prototype._items = function (entries) {
343
- var _this = this;
344
- var items = [];
345
- entries.forEach(function (entry) {
346
- var meta = _this.searchResources.find(function (x) { return x.id === entry.resourceId; });
347
- if (meta) {
348
- items.push({
349
- query: entry.query,
350
- text: entry.label,
351
- featureId: entry.id,
352
- resourceId: entry.resourceId,
353
- });
354
- }
355
- });
356
- return items;
357
- };
358
- return NgwProvider;
359
- }(BaseProvider));
63
+ class NgwProvider extends BaseProvider {
64
+ constructor(options) {
65
+ super(options);
66
+ this.caseInsensitive = true;
67
+ this.searchUrl = 'https://maxim.nextgis.com';
68
+ this.searchResources = [];
69
+ this.requests = [];
70
+ this.connector =
71
+ options.connector ||
72
+ new NgwConnector__default({
73
+ baseUrl: this.searchUrl,
74
+ });
75
+ this.searchResources = options.searchResources;
76
+ }
77
+ abort() {
78
+ this.requests.forEach((x) => {
79
+ x.cancel();
80
+ });
81
+ this.requests = [];
82
+ }
83
+ async *search(like) {
84
+ for (const resource of this.searchResources) {
85
+ const limit = resource.limit || 300;
86
+ const request = this.connector.get('feature_layer.store', {
87
+ headers: { RANGE: `items=0-${limit}` },
88
+ }, {
89
+ id: resource.id,
90
+ like,
91
+ });
92
+ this.requests.push(request);
93
+ request.catch((er) => {
94
+ console.warn(er);
95
+ });
96
+ const resp = await request;
97
+ const entries = [];
98
+ if (resp) {
99
+ resp.forEach((x) => {
100
+ entries.push({
101
+ query: like,
102
+ resourceId: resource.id,
103
+ ...x,
104
+ });
105
+ });
106
+ }
107
+ for (const item of this._items(entries)) {
108
+ item.result = () => this.result(item);
109
+ yield item;
110
+ }
111
+ }
112
+ }
113
+ result(item) {
114
+ const req = this.connector
115
+ .get('feature_layer.feature.item_extent', null, {
116
+ id: item.resourceId,
117
+ fid: item.featureId,
118
+ })
119
+ .then((x) => {
120
+ const e = x.extent;
121
+ return {
122
+ text: item.text,
123
+ extent: [e.minLon, e.minLat, e.maxLon, e.maxLat],
124
+ };
125
+ });
126
+ this.requests.push(req);
127
+ return req;
128
+ }
129
+ _items(entries) {
130
+ const items = [];
131
+ entries.forEach((entry) => {
132
+ const meta = this.searchResources.find((x) => x.id === entry.resourceId);
133
+ if (meta) {
134
+ items.push({
135
+ query: entry.query,
136
+ text: entry.label,
137
+ featureId: entry.id,
138
+ resourceId: entry.resourceId,
139
+ });
140
+ }
141
+ });
142
+ return items;
143
+ }
144
+ }
360
145
 
361
- var NominatimProvider = /** @class */ (function (_super) {
362
- __extends(NominatimProvider, _super);
363
- function NominatimProvider(options) {
364
- var _this = _super.call(this, options) || this;
365
- _this.searchUrl = 'https://nominatim.openstreetmap.org';
366
- _this._requests = [];
367
- return _this;
368
- }
369
- NominatimProvider.prototype.abort = function () {
370
- this._requests.forEach(function (x) { return x.cancel(); });
371
- this._requests = [];
372
- };
373
- NominatimProvider.prototype.search = function (val) {
374
- return __asyncGenerator(this, arguments, function search_1() {
375
- var url, request, items, _loop_1, _i, items_1, i;
376
- var _this = this;
377
- return __generator(this, function (_a) {
378
- switch (_a.label) {
379
- case 0:
380
- url = utils.fixUrlStr(
381
- // `${this.baseUrl}/search?format=geojson&polygon_geojson=1${window.locale === 'ru' ? '&accept-language=ru-RU,en-US' : ''}&q=${val}`
382
- "".concat(this.searchUrl, "/search?format=geojson&polygon_geojson=1&q=").concat(val));
383
- request = new CancelablePromise__default(function (resolve, reject, onCancel) {
384
- var xhr = new XMLHttpRequest();
385
- xhr.open('GET', url, true);
386
- xhr.onload = function () {
387
- try {
388
- var geojson = JSON.parse(xhr.responseText);
389
- var features = geojson.features.map(function (x) {
390
- return {
391
- geom: x,
392
- extent: x.bbox,
393
- text: x.properties && x.properties.display_name,
394
- query: val,
395
- };
396
- });
397
- resolve(features);
398
- }
399
- catch (er) {
400
- reject(er);
401
- }
402
- };
403
- xhr.onerror = function (er) {
404
- reject(er);
405
- };
406
- onCancel(function () {
407
- xhr.abort();
408
- });
409
- xhr.send();
410
- }).catch(function (er) {
411
- if (er.name === 'CancelError') ;
412
- throw er;
413
- });
414
- this._requests.push(request);
415
- return [4 /*yield*/, __await(request)];
416
- case 1:
417
- items = _a.sent();
418
- if (!items) return [3 /*break*/, 5];
419
- _loop_1 = function (i) {
420
- return __generator(this, function (_b) {
421
- switch (_b.label) {
422
- case 0:
423
- i.result = function () { return _this.result(i); };
424
- return [4 /*yield*/, __await(i)];
425
- case 1: return [4 /*yield*/, _b.sent()];
426
- case 2:
427
- _b.sent();
428
- return [2 /*return*/];
429
- }
430
- });
431
- };
432
- _i = 0, items_1 = items;
433
- _a.label = 2;
434
- case 2:
435
- if (!(_i < items_1.length)) return [3 /*break*/, 5];
436
- i = items_1[_i];
437
- return [5 /*yield**/, _loop_1(i)];
438
- case 3:
439
- _a.sent();
440
- _a.label = 4;
441
- case 4:
442
- _i++;
443
- return [3 /*break*/, 2];
444
- case 5: return [2 /*return*/];
445
- }
446
- });
447
- });
448
- };
449
- NominatimProvider.prototype.result = function (model) {
450
- return CancelablePromise__default.resolve({
451
- text: model.text,
452
- extent: model.extent || [],
453
- geom: model.geom,
454
- });
455
- };
456
- return NominatimProvider;
457
- }(BaseProvider));
146
+ class NominatimProvider extends BaseProvider {
147
+ constructor(options) {
148
+ super(options);
149
+ this.searchUrl = 'https://nominatim.openstreetmap.org';
150
+ this._requests = [];
151
+ }
152
+ abort() {
153
+ this._requests.forEach((x) => x.cancel());
154
+ this._requests = [];
155
+ }
156
+ async *search(val) {
157
+ // RFC2616 accept - language string
158
+ const url = utils.fixUrlStr(
159
+ // `${this.baseUrl}/search?format=geojson&polygon_geojson=1${window.locale === 'ru' ? '&accept-language=ru-RU,en-US' : ''}&q=${val}`
160
+ `${this.searchUrl}/search?format=geojson&polygon_geojson=1&q=${val}`);
161
+ const request = new CancelablePromise__default((resolve, reject, onCancel) => {
162
+ const xhr = new XMLHttpRequest();
163
+ xhr.open('GET', url, true);
164
+ xhr.onload = () => {
165
+ try {
166
+ const geojson = JSON.parse(xhr.responseText);
167
+ const features = geojson.features.map((x) => {
168
+ return {
169
+ geom: x,
170
+ extent: x.bbox,
171
+ text: x.properties && x.properties.display_name,
172
+ query: val,
173
+ };
174
+ });
175
+ resolve(features);
176
+ }
177
+ catch (er) {
178
+ reject(er);
179
+ }
180
+ };
181
+ xhr.onerror = (er) => {
182
+ reject(er);
183
+ };
184
+ onCancel(() => {
185
+ xhr.abort();
186
+ });
187
+ xhr.send();
188
+ }).catch((er) => {
189
+ if (er.name === 'CancelError') ;
190
+ throw er;
191
+ });
192
+ this._requests.push(request);
193
+ const items = await request;
194
+ if (items) {
195
+ for (const i of items) {
196
+ i.result = () => this.result(i);
197
+ yield i;
198
+ }
199
+ }
200
+ }
201
+ result(model) {
202
+ return CancelablePromise__default.resolve({
203
+ text: model.text,
204
+ extent: model.extent || [],
205
+ geom: model.geom,
206
+ });
207
+ }
208
+ }
458
209
 
459
- function create(options) {
460
- return new Geocoder(options);
210
+ function create(options) {
211
+ return new Geocoder(options);
461
212
  }
462
213
 
463
214
  exports.BaseProvider = BaseProvider;