Socket
Socket
Sign inDemoInstall

cordova-gizwits-geofencing

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-gizwits-geofencing - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

7

package.json
{
"name": "cordova-gizwits-geofencing",
"version": "1.0.2",
"version": "1.0.3",
"description": "Gizwits Geofencing tool",

@@ -13,4 +13,9 @@ "main": "index.js",

],
"repository": {
"type": "git",
"url": "git+https://gitlab.gizwits.com/xb/gizwits-plugin-geofence.git"
},
"homepage": "https://gitlab.gizwits.com/xb/gizwits-plugin-geofence#readme",
"author": "Gizwits Inc.",
"license": "ISC"
}

@@ -5,2 +5,93 @@ # Gizwits 地理围栏工具

## 接口使用说明
`App 使用该插件时,需调用 setServerInfo 方法设置服务器信息。`
当发生错误时,error 返回的是错误码。错误码请参照最后的错误码表。
1. 设置主题 setThemeInfo
```
// themeColor: 主题色
// navi_bg: 导航栏背景色
// titleColor: 标题颜色
// title: 标题
// right_title: 导航右侧按钮标题
cordova.plugins.gizGeofencing.setThemeInfo({"themeColor": "FFFFFF", "navi_bg": "FFFFFF", "titleColor": "FFFFFF", "title": "标题", "right_title": "导航栏右侧按钮标题"}, success, error)
```
2. 设置服务器信息 setServerInfo
```
// url: 服务器地址
// token
// appKey
// type: 表明 appKey 类型, 传入的值为 appId 或 enterpriseId(不传时默认值)
// version: 接口版本
cordova.plugins.gizGeofencing.setServerInfo({"url": "", "version": "", "token": "", "appKey": "", "type": ""}, success, error)
```
3. 选择或编辑区域 pickRegion
```
// 区域参数
region = {"latitude": 22.123456, "longitude": 113.123456, "radius": 200, "status": "enter/leave", "conditionId": ""}
// 选择区域时,传入空的 JSON 对象。
cordova.plugins.gizGeofencing.pickRegion({}, success, error)
// 编辑区域时,传入要编辑的区域
cordova.plugins.gizGeofencing.pickRegion(region, success, error)
```
4. 选择地址 pickAddress
```
// 地址参数
address = {"latitude": 22.123456, "longitude": 113.123456}
// 选择地址时,传入空的 JSON 对象。
cordova.plugins.gizGeofencing.pickAddress({}, success, error)
// 编辑地址时,传入要编辑的地址
cordova.plugins.gizGeofencing.pickAddress(address, success, error)
```
5. 添加区域 addRegion
```
region = {"latitude": 22.123456, "longitude": 113.123456, "radius": 200, "status": "enter/leave", "conditionId": ""}
cordova.plugins.gizGeofencing.addRegion(region, success, error)
```
6. 移除区域 removeRegion
```
region = {"latitude": 22.123456, "longitude": 113.123456, "radius": 200, "status": "enter/leave", "conditionId": ""}
cordova.plugins.gizGeofencing.removeRegion(region, success, error)
```
7. 移除所有区域 removeAllRegions
```
cordova.plugins.gizGeofencing.removeAllRegions(success, error)
```
8. 获取区域列表 getRegionList
```
cordova.plugins.gizGeofencing.getRegionList(func (regionList) {
// 区域列表 regionList
}, error)
```
9. 设置区域列表 setRegionList
```
region = {"latitude": 22.123456, "longitude": 113.123456, "radius": 200, "status": "enter/leave", "conditionId": ""}
regionList = [region]
cordova.plugins.gizGeofencing.setRegionList(regionList, success, error)
```
## 错误码

@@ -7,0 +98,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc