1.1.2 • Published 12 months ago

react-native-amap-location-track v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

react-native-amap-location-track

##项目背景 公司项目需要用到高德定位和鹰眼轨迹,高德定位来源github:react-native-amap-geolocation https://github.com/qiuxiang/react-native-amap-geolocation

集成了鹰眼服务

Getting started

$ npm install react-native-amap-location-track --save

Mostly automatic installation

Usage

定位部分使用参考

https://github.com/qiuxiang/react-native-amap-geolocation

高德鹰眼使用

     import AmapTrackManager from 'react-native-amap-location-track'

     /**
     * init(serviceId)
     * 设置轨迹服务id (int)
     */
     AmapTrackManager.init(serviceId:number);

     /**
     * setInterval(acquisition, reporting)
     * acquisition (int) 定位周期 默认5s
     * reporting (int) 打包周期 默认30s
     * 设置定位周期,打包周期
     */
     AmapTrackManager.setInterval(acquisition:number, reporting:number) ;

     /**
     * setCacheSize(cacheSize)
     * cacheSize 缓存大小 (int) 默认20m
     * 设置缓存大小
     */
    AmapTrackManager.setCacheSize(cacheSize:number)
  
   /**
    * setLocationMode(mode)
    * mode 定位模式 (int)
    * 设置定位模式
    */
   AmapTrackManager.setLocationMode(mode:number)
   
    /**
    * start()
    * 通过创建实例开始轨迹
    */
    AmapTrackManager.start(terminalName:string);


    /**
    * start()
    * 通过实例id 和轨迹id
    */
    AmapTrackManager.startByTidAndTrid(tid:number, trid:number)
         
    /**
    * stop()
    * 停止轨迹
    */
    AmapTrackManager.stop()
    /**
    * onAmapTrackInformation 轨迹创建回传事件
    * onQueryAmapTrackInformation 轨迹查询回传事件
    */
    AmapTrackManager.addEventListener(event,callback)
          
    /**
    * 查询终端实时位置
    */
    AmapTrackManager.queryLatestPoint()
1.1.1

1 year ago

1.1.2

12 months ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

2 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago