Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Docs
提交
19b0f85e
D
Docs
项目概览
OpenHarmony
/
Docs
1 年多 前同步成功
通知
159
Star
292
Fork
28
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
Docs
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
19b0f85e
编写于
8月 02, 2022
作者:
L
liu-binjun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bugfix:Modify the format error problem
Signed-off-by:
N
liu-binjun
<
liubinjun@huawei.com
>
上级
c731bd37
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
157 addition
and
156 deletion
+157
-156
en/application-dev/reference/apis/js-apis-geolocation.md
en/application-dev/reference/apis/js-apis-geolocation.md
+76
-76
zh-cn/application-dev/reference/apis/js-apis-geolocation.md
zh-cn/application-dev/reference/apis/js-apis-geolocation.md
+80
-79
zh-cn/readme/figures/location_En-1.png
zh-cn/readme/figures/location_En-1.png
+0
-0
zh-cn/readme/figures/location_zh-1.png
zh-cn/readme/figures/location_zh-1.png
+0
-0
zh-cn/readme/位置服务子系统.md
zh-cn/readme/位置服务子系统.md
+1
-1
未找到文件。
en/application-dev/reference/apis/js-apis-geolocation.md
浏览文件 @
19b0f85e
...
...
@@ -1734,11 +1734,11 @@ Set the configuration information of the reverse geocoding simulation function,
```
js
var
mockInfos
=
[
{
"
location
"
:
{
"
locale
"
:
"
shanghai
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
shanghai
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
beijing
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
beijing
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
shenzhen
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
shenzhen
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
wuhan
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
wuhan
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
chengdu
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
chengdu
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
];
geolocation
.
setReverseGeocodingMockInfo
(
mockInfos
,
(
err
,
data
)
=>
{
if
(
err
)
{
...
...
@@ -1777,11 +1777,11 @@ Set the configuration information of the reverse geocoding simulation function,
```
js
var
mockInfos
=
[
{
"
location
"
:
{
"
locale
"
:
"
shanghai
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
shanghai
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
beijing
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
beijing
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
shenzhen
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
shenzhen
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
wuhan
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
wuhan
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
chengdu
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
chengdu
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
];
geolocation
.
setReverseGeocodingMockInfo
(
mockInfos
)
.
then
((
result
)
=>
{
...
...
zh-cn/application-dev/reference/apis/js-apis-geolocation.md
浏览文件 @
19b0f85e
...
...
@@ -22,7 +22,7 @@ on(type: 'locationChange', request: LocationRequest, callback: Callback<Locat
**系统能力**
:SystemCapability.Location.Location.Core
**参数
**
:
**参数
:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
...
...
@@ -31,6 +31,7 @@ on(type: 'locationChange', request: LocationRequest, callback: Callback<Locat
| callback | Callback
<
[Location](#location)
>
| 是 | 接收位置变化状态变化监听。 |
**示例**
```
js
...
...
@@ -52,7 +53,7 @@ off(type: 'locationChange', callback?: Callback<Location>) : void
**系统能力**
:SystemCapability.Location.Location.Core
**参数
**
:
**参数
:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
...
...
@@ -82,7 +83,7 @@ on(type: 'locationServiceState', callback: Callback<boolean>) : void
**系统能力**
:SystemCapability.Location.Location.Core
**参数
**
:
**参数
:**
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
...
...
@@ -1734,11 +1735,11 @@ setReverseGeocodingMockInfo(mockInfos: Array<ReverseGeocodingMockInfo>, ca
```
js
var
mockInfos
=
[
{
"
location
"
:
{
"
locale
"
:
"
shanghai
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
shanghai
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
beijing
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
beijing
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
shenzhen
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
shenzhen
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
wuhan
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
wuhan
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
chengdu
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
chengdu
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
];
geolocation
.
setReverseGeocodingMockInfo
(
mockInfos
,
(
err
,
data
)
=>
{
if
(
err
)
{
...
...
@@ -1777,11 +1778,11 @@ setReverseGeocodingMockInfo(mockInfos: Array<ReverseGeocodingMockInfo>) :
```
js
var
mockInfos
=
[
{
"
location
"
:
{
"
locale
"
:
"
shanghai
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
shanghai
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
beijing
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
beijing
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
shenzhen
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
shenzhen
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
wuhan
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
wuhan
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
chengdu
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
chengdu
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
30.12
,
"
longitude
"
:
120.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
31.12
,
"
longitude
"
:
121.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
32.12
,
"
longitude
"
:
122.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
33.12
,
"
longitude
"
:
123.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
{
"
location
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
},
"
geoAddress
"
:
{
"
locale
"
:
"
zh
"
,
"
latitude
"
:
34.12
,
"
longitude
"
:
124.11
,
"
maxItems
"
:
1
,
"
isFromMock
"
:
true
}},
];
geolocation
.
setReverseGeocodingMockInfo
(
mockInfos
)
.
then
((
result
)
=>
{
...
...
zh-cn/readme/figures/location_En-1.png
0 → 100644
浏览文件 @
19b0f85e
28.8 KB
zh-cn/readme/figures/location_zh-1.png
0 → 100644
浏览文件 @
19b0f85e
27.9 KB
zh-cn/readme/位置服务子系统.md
浏览文件 @
19b0f85e
...
...
@@ -40,7 +40,7 @@
**图 1**
**子系统架构图**
<a
name=
"fig4460722185514"
></a>
![](
figures/zh-1.png
)
![](
figures/
location_
zh-1.png
)
## 目录<a name="section161941989596"></a>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录