@ray-js/api 1.4.40 → 1.4.42
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/@types/MapKit.d.ts
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            /**
         
     | 
| 
       2 
2 
     | 
    
         
             
             * MapKit
         
     | 
| 
       3 
3 
     | 
    
         
             
             *
         
     | 
| 
       4 
     | 
    
         
            -
             * @version 3.4. 
     | 
| 
      
 4 
     | 
    
         
            +
             * @version 3.4.13
         
     | 
| 
       5 
5 
     | 
    
         
             
             */
         
     | 
| 
       6 
6 
     | 
    
         
             
            declare namespace ty.map {
         
     | 
| 
       7 
7 
     | 
    
         
             
              /**
         
     | 
| 
         @@ -319,6 +319,124 @@ declare namespace ty.map { 
     | 
|
| 
       319 
319 
     | 
    
         
             
                }) => void
         
     | 
| 
       320 
320 
     | 
    
         
             
              }): void
         
     | 
| 
       321 
321 
     | 
    
         | 
| 
      
 322 
     | 
    
         
            +
              /**
         
     | 
| 
      
 323 
     | 
    
         
            +
               * 将经纬度转换为具体的地址
         
     | 
| 
      
 324 
     | 
    
         
            +
               */
         
     | 
| 
      
 325 
     | 
    
         
            +
              export function reverseGeocodeLocation(params: {
         
     | 
| 
      
 326 
     | 
    
         
            +
                /** 经度 */
         
     | 
| 
      
 327 
     | 
    
         
            +
                longitude: number
         
     | 
| 
      
 328 
     | 
    
         
            +
                /** 纬度 */
         
     | 
| 
      
 329 
     | 
    
         
            +
                latitude: number
         
     | 
| 
      
 330 
     | 
    
         
            +
                /** 请求的经纬度类型,wgs84 返回 gps 坐标,gcj02 返回可用于 openLocation 的坐标,默认为 wgs84 */
         
     | 
| 
      
 331 
     | 
    
         
            +
                requestType?: string
         
     | 
| 
      
 332 
     | 
    
         
            +
                /** 响应的经纬度类型,wgs84 返回 gps 坐标,gcj02 返回可用于 openLocation 的坐标,默认为 wgs84 */
         
     | 
| 
      
 333 
     | 
    
         
            +
                responseType?: string
         
     | 
| 
      
 334 
     | 
    
         
            +
                complete?: () => void
         
     | 
| 
      
 335 
     | 
    
         
            +
                success?: (params: {
         
     | 
| 
      
 336 
     | 
    
         
            +
                  /** 纬度,范围为 -90~90,负数表示南纬 */
         
     | 
| 
      
 337 
     | 
    
         
            +
                  latitude: number
         
     | 
| 
      
 338 
     | 
    
         
            +
                  /** 经度,范围为 -180~180,负数表示西经 */
         
     | 
| 
      
 339 
     | 
    
         
            +
                  longitude: number
         
     | 
| 
      
 340 
     | 
    
         
            +
                  /** 城市名称street */
         
     | 
| 
      
 341 
     | 
    
         
            +
                  cityName: string
         
     | 
| 
      
 342 
     | 
    
         
            +
                  /** 街道名称 */
         
     | 
| 
      
 343 
     | 
    
         
            +
                  streetName: string
         
     | 
| 
      
 344 
     | 
    
         
            +
                  /** 位置名称 */
         
     | 
| 
      
 345 
     | 
    
         
            +
                  address: string
         
     | 
| 
      
 346 
     | 
    
         
            +
                  /** 国家码 */
         
     | 
| 
      
 347 
     | 
    
         
            +
                  countryCode: string
         
     | 
| 
      
 348 
     | 
    
         
            +
                  /** 邮编 */
         
     | 
| 
      
 349 
     | 
    
         
            +
                  postalCode: string
         
     | 
| 
      
 350 
     | 
    
         
            +
                  /** 国家名 */
         
     | 
| 
      
 351 
     | 
    
         
            +
                  countryName: string
         
     | 
| 
      
 352 
     | 
    
         
            +
                  /** 省名 */
         
     | 
| 
      
 353 
     | 
    
         
            +
                  province: string
         
     | 
| 
      
 354 
     | 
    
         
            +
                  /** 区名, 次级区域名 */
         
     | 
| 
      
 355 
     | 
    
         
            +
                  district: string
         
     | 
| 
      
 356 
     | 
    
         
            +
                }) => void
         
     | 
| 
      
 357 
     | 
    
         
            +
                fail?: (params: {
         
     | 
| 
      
 358 
     | 
    
         
            +
                  errorMsg: string
         
     | 
| 
      
 359 
     | 
    
         
            +
                  errorCode: string | number
         
     | 
| 
      
 360 
     | 
    
         
            +
                  innerError: {
         
     | 
| 
      
 361 
     | 
    
         
            +
                    errorCode: string | number
         
     | 
| 
      
 362 
     | 
    
         
            +
                    errorMsg: string
         
     | 
| 
      
 363 
     | 
    
         
            +
                  }
         
     | 
| 
      
 364 
     | 
    
         
            +
                }) => void
         
     | 
| 
      
 365 
     | 
    
         
            +
              }): void
         
     | 
| 
      
 366 
     | 
    
         
            +
             
     | 
| 
      
 367 
     | 
    
         
            +
              /**
         
     | 
| 
      
 368 
     | 
    
         
            +
               * 将WGS84坐标系转为GCJ02坐标系
         
     | 
| 
      
 369 
     | 
    
         
            +
               */
         
     | 
| 
      
 370 
     | 
    
         
            +
              export function coordinateWGS84ToGCJ02(params: {
         
     | 
| 
      
 371 
     | 
    
         
            +
                /** 经度 */
         
     | 
| 
      
 372 
     | 
    
         
            +
                longitude: number
         
     | 
| 
      
 373 
     | 
    
         
            +
                /** 纬度 */
         
     | 
| 
      
 374 
     | 
    
         
            +
                latitude: number
         
     | 
| 
      
 375 
     | 
    
         
            +
                complete?: () => void
         
     | 
| 
      
 376 
     | 
    
         
            +
                success?: (params: {
         
     | 
| 
      
 377 
     | 
    
         
            +
                  /** 经度 */
         
     | 
| 
      
 378 
     | 
    
         
            +
                  longitude: number
         
     | 
| 
      
 379 
     | 
    
         
            +
                  /** 纬度 */
         
     | 
| 
      
 380 
     | 
    
         
            +
                  latitude: number
         
     | 
| 
      
 381 
     | 
    
         
            +
                }) => void
         
     | 
| 
      
 382 
     | 
    
         
            +
                fail?: (params: {
         
     | 
| 
      
 383 
     | 
    
         
            +
                  errorMsg: string
         
     | 
| 
      
 384 
     | 
    
         
            +
                  errorCode: string | number
         
     | 
| 
      
 385 
     | 
    
         
            +
                  innerError: {
         
     | 
| 
      
 386 
     | 
    
         
            +
                    errorCode: string | number
         
     | 
| 
      
 387 
     | 
    
         
            +
                    errorMsg: string
         
     | 
| 
      
 388 
     | 
    
         
            +
                  }
         
     | 
| 
      
 389 
     | 
    
         
            +
                }) => void
         
     | 
| 
      
 390 
     | 
    
         
            +
              }): void
         
     | 
| 
      
 391 
     | 
    
         
            +
             
     | 
| 
      
 392 
     | 
    
         
            +
              /**
         
     | 
| 
      
 393 
     | 
    
         
            +
               * 将GCJ02坐标系转为WGS84坐标系
         
     | 
| 
      
 394 
     | 
    
         
            +
               */
         
     | 
| 
      
 395 
     | 
    
         
            +
              export function coordinateGCJ02ToWGS84(params: {
         
     | 
| 
      
 396 
     | 
    
         
            +
                /** 经度 */
         
     | 
| 
      
 397 
     | 
    
         
            +
                longitude: number
         
     | 
| 
      
 398 
     | 
    
         
            +
                /** 纬度 */
         
     | 
| 
      
 399 
     | 
    
         
            +
                latitude: number
         
     | 
| 
      
 400 
     | 
    
         
            +
                complete?: () => void
         
     | 
| 
      
 401 
     | 
    
         
            +
                success?: (params: {
         
     | 
| 
      
 402 
     | 
    
         
            +
                  /** 经度 */
         
     | 
| 
      
 403 
     | 
    
         
            +
                  longitude: number
         
     | 
| 
      
 404 
     | 
    
         
            +
                  /** 纬度 */
         
     | 
| 
      
 405 
     | 
    
         
            +
                  latitude: number
         
     | 
| 
      
 406 
     | 
    
         
            +
                }) => void
         
     | 
| 
      
 407 
     | 
    
         
            +
                fail?: (params: {
         
     | 
| 
      
 408 
     | 
    
         
            +
                  errorMsg: string
         
     | 
| 
      
 409 
     | 
    
         
            +
                  errorCode: string | number
         
     | 
| 
      
 410 
     | 
    
         
            +
                  innerError: {
         
     | 
| 
      
 411 
     | 
    
         
            +
                    errorCode: string | number
         
     | 
| 
      
 412 
     | 
    
         
            +
                    errorMsg: string
         
     | 
| 
      
 413 
     | 
    
         
            +
                  }
         
     | 
| 
      
 414 
     | 
    
         
            +
                }) => void
         
     | 
| 
      
 415 
     | 
    
         
            +
              }): void
         
     | 
| 
      
 416 
     | 
    
         
            +
             
     | 
| 
      
 417 
     | 
    
         
            +
              /**
         
     | 
| 
      
 418 
     | 
    
         
            +
               * 获取当前地图类型
         
     | 
| 
      
 419 
     | 
    
         
            +
               *huawei: 华为地图
         
     | 
| 
      
 420 
     | 
    
         
            +
               *google: 谷歌地图
         
     | 
| 
      
 421 
     | 
    
         
            +
               *amap: 高德地图
         
     | 
| 
      
 422 
     | 
    
         
            +
               *apple: 苹果地图
         
     | 
| 
      
 423 
     | 
    
         
            +
               */
         
     | 
| 
      
 424 
     | 
    
         
            +
              export function getMapType(params?: {
         
     | 
| 
      
 425 
     | 
    
         
            +
                complete?: () => void
         
     | 
| 
      
 426 
     | 
    
         
            +
                success?: (params: {
         
     | 
| 
      
 427 
     | 
    
         
            +
                  /** 地图类型 */
         
     | 
| 
      
 428 
     | 
    
         
            +
                  type: string
         
     | 
| 
      
 429 
     | 
    
         
            +
                }) => void
         
     | 
| 
      
 430 
     | 
    
         
            +
                fail?: (params: {
         
     | 
| 
      
 431 
     | 
    
         
            +
                  errorMsg: string
         
     | 
| 
      
 432 
     | 
    
         
            +
                  errorCode: string | number
         
     | 
| 
      
 433 
     | 
    
         
            +
                  innerError: {
         
     | 
| 
      
 434 
     | 
    
         
            +
                    errorCode: string | number
         
     | 
| 
      
 435 
     | 
    
         
            +
                    errorMsg: string
         
     | 
| 
      
 436 
     | 
    
         
            +
                  }
         
     | 
| 
      
 437 
     | 
    
         
            +
                }) => void
         
     | 
| 
      
 438 
     | 
    
         
            +
              }): void
         
     | 
| 
      
 439 
     | 
    
         
            +
             
     | 
| 
       322 
440 
     | 
    
         
             
              export type GeofenceInfo = {
         
     | 
| 
       323 
441 
     | 
    
         
             
                /** 地理围栏名称 */
         
     | 
| 
       324 
442 
     | 
    
         
             
                geoTitle?: string
         
     | 
| 
         @@ -466,4 +584,27 @@ declare namespace ty.map { 
     | 
|
| 
       466 
584 
     | 
    
         
             
                /** 区名, 次级区域名 */
         
     | 
| 
       467 
585 
     | 
    
         
             
                district: string
         
     | 
| 
       468 
586 
     | 
    
         
             
              }
         
     | 
| 
      
 587 
     | 
    
         
            +
             
     | 
| 
      
 588 
     | 
    
         
            +
              export type ReverseGeocodeLocationReq = {
         
     | 
| 
      
 589 
     | 
    
         
            +
                /** 经度 */
         
     | 
| 
      
 590 
     | 
    
         
            +
                longitude: number
         
     | 
| 
      
 591 
     | 
    
         
            +
                /** 纬度 */
         
     | 
| 
      
 592 
     | 
    
         
            +
                latitude: number
         
     | 
| 
      
 593 
     | 
    
         
            +
                /** 请求的经纬度类型,wgs84 返回 gps 坐标,gcj02 返回可用于 openLocation 的坐标,默认为 wgs84 */
         
     | 
| 
      
 594 
     | 
    
         
            +
                requestType?: string
         
     | 
| 
      
 595 
     | 
    
         
            +
                /** 响应的经纬度类型,wgs84 返回 gps 坐标,gcj02 返回可用于 openLocation 的坐标,默认为 wgs84 */
         
     | 
| 
      
 596 
     | 
    
         
            +
                responseType?: string
         
     | 
| 
      
 597 
     | 
    
         
            +
              }
         
     | 
| 
      
 598 
     | 
    
         
            +
             
     | 
| 
      
 599 
     | 
    
         
            +
              export type Coordinate = {
         
     | 
| 
      
 600 
     | 
    
         
            +
                /** 经度 */
         
     | 
| 
      
 601 
     | 
    
         
            +
                longitude: number
         
     | 
| 
      
 602 
     | 
    
         
            +
                /** 纬度 */
         
     | 
| 
      
 603 
     | 
    
         
            +
                latitude: number
         
     | 
| 
      
 604 
     | 
    
         
            +
              }
         
     | 
| 
      
 605 
     | 
    
         
            +
             
     | 
| 
      
 606 
     | 
    
         
            +
              export type MapTypeBean = {
         
     | 
| 
      
 607 
     | 
    
         
            +
                /** 地图类型 */
         
     | 
| 
      
 608 
     | 
    
         
            +
                type: string
         
     | 
| 
      
 609 
     | 
    
         
            +
              }
         
     | 
| 
       469 
610 
     | 
    
         
             
            }
         
     | 
| 
         @@ -10,4 +10,8 @@ export declare const map: { 
     | 
|
| 
       10 
10 
     | 
    
         
             
                unregisterGeofence: typeof ty.map.unregisterGeofence;
         
     | 
| 
       11 
11 
     | 
    
         
             
                updateGeofence: typeof ty.map.updateGeofence;
         
     | 
| 
       12 
12 
     | 
    
         
             
                transformLocation: typeof ty.map.transformLocation;
         
     | 
| 
      
 13 
     | 
    
         
            +
                reverseGeocodeLocation: typeof ty.map.reverseGeocodeLocation;
         
     | 
| 
      
 14 
     | 
    
         
            +
                coordinateWGS84ToGCJ02: typeof ty.map.coordinateWGS84ToGCJ02;
         
     | 
| 
      
 15 
     | 
    
         
            +
                coordinateGCJ02ToWGS84: typeof ty.map.coordinateGCJ02ToWGS84;
         
     | 
| 
      
 16 
     | 
    
         
            +
                getMapType: typeof ty.map.getMapType;
         
     | 
| 
       13 
17 
     | 
    
         
             
            };
         
     | 
| 
         @@ -34,5 +34,18 @@ export const map = { 
     | 
|
| 
       34 
34 
     | 
    
         
             
              // MapKit >=3.2.2 ray 1.4.38 新增
         
     | 
| 
       35 
35 
     | 
    
         
             
              transformLocation: factory('transformLocation', {
         
     | 
| 
       36 
36 
     | 
    
         
             
                "namespace": "map"
         
     | 
| 
      
 37 
     | 
    
         
            +
              }),
         
     | 
| 
      
 38 
     | 
    
         
            +
              // MapKit >=3.4.13 ray 1.4.41 新增
         
     | 
| 
      
 39 
     | 
    
         
            +
              reverseGeocodeLocation: factory('reverseGeocodeLocation', {
         
     | 
| 
      
 40 
     | 
    
         
            +
                "namespace": "map"
         
     | 
| 
      
 41 
     | 
    
         
            +
              }),
         
     | 
| 
      
 42 
     | 
    
         
            +
              coordinateWGS84ToGCJ02: factory('coordinateWGS84ToGCJ02', {
         
     | 
| 
      
 43 
     | 
    
         
            +
                "namespace": "map"
         
     | 
| 
      
 44 
     | 
    
         
            +
              }),
         
     | 
| 
      
 45 
     | 
    
         
            +
              coordinateGCJ02ToWGS84: factory('coordinateGCJ02ToWGS84', {
         
     | 
| 
      
 46 
     | 
    
         
            +
                "namespace": "map"
         
     | 
| 
      
 47 
     | 
    
         
            +
              }),
         
     | 
| 
      
 48 
     | 
    
         
            +
              getMapType: factory('getMapType', {
         
     | 
| 
      
 49 
     | 
    
         
            +
                "namespace": "map"
         
     | 
| 
       37 
50 
     | 
    
         
             
              })
         
     | 
| 
       38 
51 
     | 
    
         
             
            };
         
     | 
    
        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.4. 
     | 
| 
      
 6 
     | 
    
         
            +
            export * from './MapKit-3.4.13';
         
     | 
| 
       7 
7 
     | 
    
         
             
            export * from './HomeKit-3.1.4';
         
     | 
| 
       8 
8 
     | 
    
         
             
            export * from './P2PKit-2.0.3';
         
     | 
| 
       9 
9 
     | 
    
         
             
            export * from './OutdoorKit-1.0.4';
         
     | 
    
        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.4. 
     | 
| 
      
 6 
     | 
    
         
            +
            export * from './MapKit-3.4.13';
         
     | 
| 
       7 
7 
     | 
    
         
             
            export * from './HomeKit-3.1.4';
         
     | 
| 
       8 
8 
     | 
    
         
             
            export * from './P2PKit-2.0.3';
         
     | 
| 
       9 
9 
     | 
    
         
             
            export * from './OutdoorKit-1.0.4';
         
     | 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@ray-js/api",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "1.4. 
     | 
| 
      
 3 
     | 
    
         
            +
              "version": "1.4.42",
         
     | 
| 
       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. 
     | 
| 
       33 
     | 
    
         
            -
                "@ray-js/router": "1.4. 
     | 
| 
      
 32 
     | 
    
         
            +
                "@ray-js/framework": "1.4.42",
         
     | 
| 
      
 33 
     | 
    
         
            +
                "@ray-js/router": "1.4.42",
         
     | 
| 
       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. 
     | 
| 
      
 39 
     | 
    
         
            +
                "@ray-js/cli": "1.4.42",
         
     | 
| 
       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": " 
     | 
| 
      
 49 
     | 
    
         
            +
              "gitHead": "248b5bb0a425502d5ac45a1a8af5a6b96d3e1dc9"
         
     | 
| 
       50 
50 
     | 
    
         
             
            }
         
     |