@maptec/maptec-js 1.0.0 → 1.0.2
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/Maptec.d.ts +19 -21
- package/Maptec.esm.js +1 -0
- package/Maptec.js +1 -1
- package/README.md +1 -1
- package/README.npm.md +1 -1
- package/package.json +16 -5
package/Maptec.d.ts
CHANGED
|
@@ -24901,18 +24901,18 @@ export declare class PlaceSearch {
|
|
|
24901
24901
|
*/
|
|
24902
24902
|
export type GeocodeStatus = "OK" | "ZERO_RESULTS" | "ERROR";
|
|
24903
24903
|
/**
|
|
24904
|
-
*
|
|
24904
|
+
* 矩形地理范围,由西南角与东北角的 `{ latitude, longitude }` 定义。
|
|
24905
24905
|
* @group 类型
|
|
24906
24906
|
*/
|
|
24907
|
-
export type
|
|
24907
|
+
export type GeocodeBounds = {
|
|
24908
24908
|
/**
|
|
24909
|
-
*
|
|
24909
|
+
* 矩形西南角。
|
|
24910
24910
|
*/
|
|
24911
|
-
|
|
24911
|
+
southwest: LngLatObject;
|
|
24912
24912
|
/**
|
|
24913
|
-
*
|
|
24913
|
+
* 矩形东北角。
|
|
24914
24914
|
*/
|
|
24915
|
-
|
|
24915
|
+
northeast: LngLatObject;
|
|
24916
24916
|
};
|
|
24917
24917
|
/**
|
|
24918
24918
|
* 结构化地址组件数组,包含适用于该地址的各个组成部分。
|
|
@@ -24968,7 +24968,7 @@ export type GeocodeGeometry = {
|
|
|
24968
24968
|
/**
|
|
24969
24969
|
* 返回结果的推荐视口。
|
|
24970
24970
|
*/
|
|
24971
|
-
viewport:
|
|
24971
|
+
viewport: GeocodeBounds;
|
|
24972
24972
|
};
|
|
24973
24973
|
/**
|
|
24974
24974
|
* 匹配质量评价。(正向地理编码特有)
|
|
@@ -25148,15 +25148,16 @@ export type GeocodeLocationOptions = {
|
|
|
25148
25148
|
/**
|
|
25149
25149
|
* 地理偏向矩形区域,仅用于“偏向”该区域内的结果,不保证结果都落在此范围内。
|
|
25150
25150
|
*
|
|
25151
|
-
*
|
|
25151
|
+
* `southwest` / `northeast` 必须为 `{ latitude, longitude }` 对象,例如:
|
|
25152
25152
|
*
|
|
25153
|
-
*
|
|
25154
|
-
*
|
|
25153
|
+
* ```json
|
|
25154
|
+
* {
|
|
25155
|
+
* "southwest": { "latitude": 1.448946, "longitude": 103.779524 },
|
|
25156
|
+
* "northeast": { "latitude": 1.468946, "longitude": 103.799524 }
|
|
25157
|
+
* }
|
|
25158
|
+
* ```
|
|
25155
25159
|
*/
|
|
25156
|
-
locationBias?:
|
|
25157
|
-
northeast: LngLatLike;
|
|
25158
|
-
southwest: LngLatLike;
|
|
25159
|
-
};
|
|
25160
|
+
locationBias?: GeocodeBounds;
|
|
25160
25161
|
/**
|
|
25161
25162
|
* 返回结果语言(IETF 语言标签),例如 `'en'`、`'en-GB'`、`'zh-CN'`。
|
|
25162
25163
|
*
|
|
@@ -25244,7 +25245,6 @@ export declare class Geocode {
|
|
|
25244
25245
|
private _getLanguage;
|
|
25245
25246
|
private _getRegion;
|
|
25246
25247
|
private _toApiLatLng;
|
|
25247
|
-
private _toApiLocationBias;
|
|
25248
25248
|
private _buildQueryString;
|
|
25249
25249
|
private _request;
|
|
25250
25250
|
/**
|
|
@@ -25293,7 +25293,7 @@ export declare class Geocode {
|
|
|
25293
25293
|
* ```
|
|
25294
25294
|
*
|
|
25295
25295
|
* @example
|
|
25296
|
-
* 使用 locationBias
|
|
25296
|
+
* 使用 locationBias 做结果偏向(southwest / northeast 为 `{ latitude, longitude }`)
|
|
25297
25297
|
* ```ts
|
|
25298
25298
|
* const geocode = new Geocode();
|
|
25299
25299
|
*
|
|
@@ -25301,11 +25301,9 @@ export declare class Geocode {
|
|
|
25301
25301
|
* 'coffee',
|
|
25302
25302
|
* {
|
|
25303
25303
|
* locationBias: {
|
|
25304
|
-
*
|
|
25305
|
-
*
|
|
25306
|
-
*
|
|
25307
|
-
* northeast: [104.1, 1.48],
|
|
25308
|
-
* }
|
|
25304
|
+
* southwest: {latitude: 1.20, longitude: 103.6},
|
|
25305
|
+
* northeast: {latitude: 1.48, longitude: 104.1},
|
|
25306
|
+
* },
|
|
25309
25307
|
* },
|
|
25310
25308
|
* (error, result) => {
|
|
25311
25309
|
* if (error) return;
|