@ray-js/api 1.4.36 → 1.4.38

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,7 +1,7 @@
1
1
  /**
2
2
  * MapKit
3
3
  *
4
- * @version 3.0.7
4
+ * @version 3.4.9
5
5
  */
6
6
  declare namespace ty.map {
7
7
  /**
@@ -181,6 +181,16 @@ declare namespace ty.map {
181
181
  streetName: string
182
182
  /** 位置名称 */
183
183
  address: string
184
+ /** 国家码 */
185
+ countryCode: string
186
+ /** 邮编 */
187
+ postalCode: string
188
+ /** 国家名 */
189
+ countryName: string
190
+ /** 省名 */
191
+ province: string
192
+ /** 区名, 次级区域名 */
193
+ district: string
184
194
  }) => void
185
195
  fail?: (params: {
186
196
  errorMsg: string
@@ -266,6 +276,49 @@ declare namespace ty.map {
266
276
  }) => void
267
277
  }): void
268
278
 
279
+ /**
280
+ * 根据经纬度或者地址
281
+ */
282
+ export function transformLocation(params: {
283
+ /** wgs84 返回 gps 坐标,gcj02 返回可用于 openLocation 的坐标 */
284
+ type: string
285
+ /** 纬度,范围为 -90~90,负数表示南纬 */
286
+ latitude: number
287
+ /** 经度,范围为 -180~180,负数表示西经 */
288
+ longitude: number
289
+ complete?: () => void
290
+ success?: (params: {
291
+ /** 纬度,范围为 -90~90,负数表示南纬 */
292
+ latitude: number
293
+ /** 经度,范围为 -180~180,负数表示西经 */
294
+ longitude: number
295
+ /** 城市名称street */
296
+ cityName: string
297
+ /** 街道名称 */
298
+ streetName: string
299
+ /** 位置名称 */
300
+ address: string
301
+ /** 国家码 */
302
+ countryCode: string
303
+ /** 邮编 */
304
+ postalCode: string
305
+ /** 国家名 */
306
+ countryName: string
307
+ /** 省名 */
308
+ province: string
309
+ /** 区名, 次级区域名 */
310
+ district: string
311
+ }) => void
312
+ fail?: (params: {
313
+ errorMsg: string
314
+ errorCode: string | number
315
+ innerError: {
316
+ errorCode: string | number
317
+ errorMsg: string
318
+ }
319
+ }) => void
320
+ }): void
321
+
269
322
  export type GeofenceInfo = {
270
323
  /** 地理围栏名称 */
271
324
  geoTitle?: string
@@ -334,6 +387,16 @@ declare namespace ty.map {
334
387
  streetName: string
335
388
  /** 位置名称 */
336
389
  address: string
390
+ /** 国家码 */
391
+ countryCode: string
392
+ /** 邮编 */
393
+ postalCode: string
394
+ /** 国家名 */
395
+ countryName: string
396
+ /** 省名 */
397
+ province: string
398
+ /** 区名, 次级区域名 */
399
+ district: string
337
400
  }
338
401
 
339
402
  export type ChooseBean = {
@@ -371,4 +434,36 @@ declare namespace ty.map {
371
434
  /** 地图类型,目前支持:BMK:百度地图 MA:高德地图 TENCENT:腾讯地图 Google:Google地图 */
372
435
  mapType: string
373
436
  }
437
+
438
+ export type TransformLocationReq = {
439
+ /** wgs84 返回 gps 坐标,gcj02 返回可用于 openLocation 的坐标 */
440
+ type: string
441
+ /** 纬度,范围为 -90~90,负数表示南纬 */
442
+ latitude: number
443
+ /** 经度,范围为 -180~180,负数表示西经 */
444
+ longitude: number
445
+ }
446
+
447
+ export type TransformLocationResp = {
448
+ /** 纬度,范围为 -90~90,负数表示南纬 */
449
+ latitude: number
450
+ /** 经度,范围为 -180~180,负数表示西经 */
451
+ longitude: number
452
+ /** 城市名称street */
453
+ cityName: string
454
+ /** 街道名称 */
455
+ streetName: string
456
+ /** 位置名称 */
457
+ address: string
458
+ /** 国家码 */
459
+ countryCode: string
460
+ /** 邮编 */
461
+ postalCode: string
462
+ /** 国家名 */
463
+ countryName: string
464
+ /** 省名 */
465
+ province: string
466
+ /** 区名, 次级区域名 */
467
+ district: string
468
+ }
374
469
  }
@@ -9,4 +9,5 @@ export declare const map: {
9
9
  registerGeofence: typeof ty.map.registerGeofence;
10
10
  unregisterGeofence: typeof ty.map.unregisterGeofence;
11
11
  updateGeofence: typeof ty.map.updateGeofence;
12
+ transformLocation: typeof ty.map.transformLocation;
12
13
  };
@@ -30,5 +30,9 @@ export const map = {
30
30
  }),
31
31
  updateGeofence: factory('updateGeofence', {
32
32
  "namespace": "map"
33
+ }),
34
+ // MapKit >=3.2.2 ray 1.4.38 新增
35
+ transformLocation: factory('transformLocation', {
36
+ "namespace": "map"
33
37
  })
34
38
  };
package/lib/all-kits.d.ts CHANGED
@@ -3,7 +3,7 @@ export * from './BizKit-3.2.7';
3
3
  export * from './DeviceKit-3.3.1';
4
4
  export * from './MiniKit-3.1.0';
5
5
  export * from './PlayNetKit-1.1.3';
6
- export * from './MapKit-3.0.7';
6
+ export * from './MapKit-3.4.9';
7
7
  export * from './HomeKit-3.1.4';
8
8
  export * from './P2PKit-2.0.3';
9
9
  import * as device from './DeviceKit-3.3.1';
package/lib/all-kits.js CHANGED
@@ -3,7 +3,7 @@ export * from './BizKit-3.2.7';
3
3
  export * from './DeviceKit-3.3.1';
4
4
  export * from './MiniKit-3.1.0';
5
5
  export * from './PlayNetKit-1.1.3';
6
- export * from './MapKit-3.0.7';
6
+ export * from './MapKit-3.4.9';
7
7
  export * from './HomeKit-3.1.4';
8
8
  export * from './P2PKit-2.0.3';
9
9
  import * as device from './DeviceKit-3.3.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.4.36",
3
+ "version": "1.4.38",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,14 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.4.36",
33
- "@ray-js/router": "1.4.36",
32
+ "@ray-js/framework": "1.4.38",
33
+ "@ray-js/router": "1.4.38",
34
34
  "@ray-js/wechat": "^0.0.33",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.4.36",
39
+ "@ray-js/cli": "1.4.38",
40
40
  "art-template": "^4.13.2",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.2",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org"
48
48
  },
49
- "gitHead": "9037ef50343f4364daff62e5d2beee13117dc8b3"
49
+ "gitHead": "90a4ff46cecf0423df2de590703d8892ce56203b"
50
50
  }