diff --git a/en/application-dev/reference/apis/js-apis-geolocation.md b/en/application-dev/reference/apis/js-apis-geolocation.md
index d08cc7aafb9e16ecd89533e4a772c18372d23da5..f15805a326e19b0a579d1da1ae0e44e9937fef6f 100644
--- a/en/application-dev/reference/apis/js-apis-geolocation.md
+++ b/en/application-dev/reference/apis/js-apis-geolocation.md
@@ -24,7 +24,7 @@ Registers a listener for location changes with a location request initiated.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **locationChange** indicates a location change event.|
| request | LocationRequest | Yes| Location request.|
@@ -54,7 +54,7 @@ Unregisters the listener for location changes with the corresponding location re
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **locationChange** indicates a location change event.|
| callback | Callback<[Location](#location)> | No| Callback used to return the location change event.|
@@ -84,7 +84,7 @@ Registers a listener for location service status change events.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **locationServiceState** indicates a location service status change event.|
| callback | Callback<boolean> | Yes| Callback used to return the location service status change event.|
@@ -112,7 +112,7 @@ Unregisters the listener for location service status change events.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **locationServiceState** indicates a location service status change event.|
| callback | Callback<boolean> | No| Callback used to return the location service status change event.|
@@ -141,7 +141,7 @@ Registers a listener for cached GNSS location reports.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **cachedGnssLocationsReporting** indicates reporting of cached GNSS locations.|
| request | CachedGnssLocationsRequest | Yes| Request for reporting cached GNSS location.|
@@ -171,7 +171,7 @@ Unregisters the listener for cached GNSS location reports.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **cachedGnssLocationsReporting** indicates reporting of cached GNSS locations.|
| callback | Callback<boolean> | No| Callback used to return cached GNSS locations.|
@@ -201,7 +201,7 @@ Registers a listener for GNSS satellite status change events.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **gnssStatusChange** indicates a GNSS satellite status change.|
| callback | Callback<SatelliteStatusInfo> | Yes| Callback used to return GNSS satellite status changes.|
@@ -229,7 +229,7 @@ Unregisters the listener for GNSS satellite status change events.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **gnssStatusChange** indicates a GNSS satellite status change.|
| callback | Callback<SatelliteStatusInfo> | No| Callback used to return GNSS satellite status changes.|
@@ -257,7 +257,7 @@ Registers a listener for GNSS NMEA message change events.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **nmeaMessageChange** indicates a GNSS NMEA message change.|
| callback | Callback<string> | Yes| Callback used to return GNSS NMEA message changes.|
@@ -285,7 +285,7 @@ Unregisters the listener for GNSS NMEA message change events.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **nmeaMessageChange** indicates a GNSS NMEA message change.|
| callback | Callback<string> | No| Callback used to return GNSS NMEA message changes.|
@@ -314,7 +314,7 @@ Registers a listener for status change events of the specified geofence.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **fenceStatusChange** indicates a geofence status change.|
| request | GeofenceRequest | Yes| Geofencing request.|
@@ -359,7 +359,7 @@ Unregisters the listener for status change events of the specified geofence.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value **fenceStatusChange** indicates a geofence status change.|
| request | GeofenceRequest | Yes| Geofencing request.|
@@ -402,7 +402,7 @@ Subscribe to country code information reporting events.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value is "countrycodechange", which means subscribing to the submission of country code information. |
| callback | Callback<CountryCode> | Yes | Callback is used to receive the country code information report. |
@@ -428,7 +428,7 @@ Unsubscribe from the country code to report events.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Event type. The value is "countrycodechange", which means unsubscribing to the submission of country code information. |
| callback | Callback<CountryCode> | Yes | Callback is used to receive the country code information report. |
@@ -458,7 +458,7 @@ Obtains the current location. This API uses an asynchronous callback to return t
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| request | [CurrentLocationRequest](#currentlocationrequest) | No| Location request.|
| callback | AsyncCallback<[Location](#location)> | Yes| Callback used to return the current location.|
@@ -493,13 +493,13 @@ Obtains the current location. This API uses a promise to return the result.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| request | [CurrentLocationRequest](#currentlocationrequest) | No| Location request.|
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<[Location](#location)> | Promise used to return the current location.|
@@ -526,7 +526,7 @@ Obtains the previous location. This API uses an asynchronous callback to return
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<[Location](#location)> | Yes| Callback used to return the previous location.|
@@ -557,7 +557,7 @@ Obtains the previous location. This API uses a promise to return the result.
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<[Location](#location)> | Promise used to return the previous location.|
@@ -584,7 +584,7 @@ Checks whether the location service is enabled. This API uses an asynchronous ca
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | Yes| Callback used to return the location service status.|
@@ -614,7 +614,7 @@ Checks whether the location service is enabled. This API uses a promise to retur
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return the location service status.|
@@ -640,7 +640,7 @@ Requests to enable the location service. This API uses an asynchronous callback
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | Yes| Callback used to return the location service status.|
@@ -670,7 +670,7 @@ Requests to enable the location service. This API uses a promise to return the r
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return the location service status.|
@@ -697,7 +697,7 @@ Enables the location service. This API uses an asynchronous callback to return t
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | Yes| Callback used to return the location service status.|
@@ -729,7 +729,7 @@ Enables the location service. This API uses a promise to return the result.
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return the location service status.|
@@ -755,7 +755,7 @@ Disables the location service. This API uses an asynchronous callback to return
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | Yes| Callback used to return the location service status.|
@@ -787,7 +787,7 @@ Disables the location service. This API uses a promise to return the result.
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return the location service status.|
@@ -811,7 +811,7 @@ Checks whether the (reverse) geocoding service is available. This API uses an as
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | Yes| Callback used to return the (reverse) geocoding service status.|
@@ -841,7 +841,7 @@ Checks whether the (reverse) geocoding service is available. This API uses a pro
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return the (reverse) geocoding service status.|
@@ -866,7 +866,7 @@ Converts coordinates into geographic description through reverse geocoding. This
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| request | [ReverseGeoCodeRequest](#reversegeocoderequest) | Yes| Reverse geocoding request.|
| callback | AsyncCallback<Array<[GeoAddress](#geoaddress)>> | Yes| Callback used to return the reverse geocoding result.|
@@ -898,13 +898,13 @@ Converts coordinates into geographic description through reverse geocoding. This
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| request | [ReverseGeoCodeRequest](#reversegeocoderequest) | Yes| Reverse geocoding request.|
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<Array<[GeoAddress](#geoaddress)>> | Promise used to return the reverse geocoding result.|
@@ -930,7 +930,7 @@ Converts geographic description into coordinates through geocoding. This API use
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| request | [GeoCodeRequest](#geocoderequest) | Yes| Geocoding request.|
| callback | AsyncCallback<Array<[GeoAddress](#geoaddress)>> | Yes| Callback used to return the geocoding result.|
@@ -962,13 +962,13 @@ Converts geographic description into coordinates through geocoding. This API use
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| request | [GeoCodeRequest](#geocoderequest) | Yes| Geocoding request.|
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<Array<[GeoAddress](#geoaddress)>> | Callback used to return the geocoding result.|
@@ -994,7 +994,7 @@ Obtains the number of cached GNSS locations.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<number> | Yes| Callback used to return the number of cached GNSS locations. |
@@ -1024,7 +1024,7 @@ Obtains the number of cached GNSS locations.
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<number> | Promise used to return the number of cached GNSS locations.|
@@ -1049,7 +1049,7 @@ Obtains all cached GNSS locations and clears the GNSS cache queue.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | Yes| Callback used to return the operation result.|
@@ -1079,7 +1079,7 @@ Obtains all cached GNSS locations and clears the GNSS cache queue.
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<boolean> | Promise used to return the operation result.|
@@ -1104,7 +1104,7 @@ Sends an extended command to the location subsystem. This API can only be called
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| command | LocationCommand | Yes| Extended command (string) to be sent.|
| callback | AsyncCallback<boolean> | Yes| Callback used to return the operation result.|
@@ -1136,13 +1136,13 @@ Sends an extended command to the location subsystem. This API can only be called
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| command | LocationCommand | Yes| Extended command (string) to be sent.|
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<boolean> | Callback used to return the operation result.|
@@ -1170,7 +1170,7 @@ Checks whether a user agrees with the privacy statement of the location service.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | Yes| Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service.|
| callback | AsyncCallback<boolean> | Yes| Callback used to return the result, which indicates whether the user agrees with the privacy statement.|
@@ -1203,13 +1203,13 @@ Checks whether a user agrees with the privacy statement of the location service.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | Yes| Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service.|
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<boolean> | Callback used to return the result, which indicates whether the user agrees with the privacy statement.|
@@ -1236,7 +1236,7 @@ Sets the user confirmation status for the privacy statement of the location serv
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | Yes| Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service.|
| isConfirmed | boolean | Yes| Callback used to return the result, which indicates whether the user agrees with the privacy statement.|
@@ -1270,14 +1270,14 @@ Sets the user confirmation status for the privacy statement of the location serv
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | Yes| Privacy statement type, for example, privacy statement displayed in the startup wizard or privacy statement displayed when enabling the location service.|
| isConfirmed | boolean | Yes| Callback used to return the result, which indicates whether the user agrees with the privacy statement.|
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<boolean> | Callback used to return the operation result.|
@@ -1300,7 +1300,7 @@ Query the current country code.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<CountryCode> | Yes | Callback is used to receive the country code. |
@@ -1332,7 +1332,7 @@ None
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<CountryCode> | return country code. |
@@ -1361,7 +1361,7 @@ Enable the position simulation function of a scene, and only one scene can be en
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | No | Indicates under what scenario the position simulation function is enabled. |
| callback | AsyncCallback<void> | Yes | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -1392,14 +1392,14 @@ Enable the position simulation function of a scene, and only one scene can be en
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | No | Indicates which scene's position simulation function is enabled. If this parameter is not carried, it means that the position simulation function of all scenes is enabled. |
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<void> | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -1433,7 +1433,7 @@ To disable the position simulation function.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | No | Indicates to disable the position simulation function of a scene. If this parameter is not carried, it means to disable the position simulation function of all scenes. |
| callback | AsyncCallback<void> | Yes | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -1465,13 +1465,13 @@ To disable the position simulation function.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | No | Indicates to disable the position simulation function of a scene. If this parameter is not carried, it means to disable the position simulation function of all scenes. |
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<void> | It is used to receive the execution result. If the execution is successful, it will return nullptr, otherwise it will return an error message |
@@ -1505,7 +1505,7 @@ Set the simulated location information, and then report the simulated location a
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| config | LocationMockConfig | Yes | Indicates the configuration parameters of location simulation, including the time interval of simulation location reporting and the array of simulation locations. |
| callback | AsyncCallback<void> | Yes | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -1543,13 +1543,13 @@ Set the simulated location information, and then report the simulated location a
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| config | LocationMockConfig | Yes | Indicates the configuration parameters of location simulation, including the time interval of simulation location reporting and the array of simulation locations. |
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<void> | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -1591,7 +1591,7 @@ Enable reverse geocoding simulation function.
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<void> | Yes | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -1625,7 +1625,7 @@ None
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<void> | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -1658,7 +1658,7 @@ Disable reverse geocoding simulation function.
**Parameters**:
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<void> | Yes | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message |
@@ -1692,7 +1692,7 @@ None
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<void> | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -1725,7 +1725,7 @@ Set the configuration information of the reverse geocoding simulation function,
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| mockInfos | Array<ReverseGeocodingMockInfo> | Yes | An array of configuration parameters indicating the inverse geocoding simulation function. The configuration parameters of the inverse geocoding simulation function include a location and a place name. |
| callback | AsyncCallback<void> | Yes | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -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) {
@@ -1763,13 +1763,13 @@ Set the configuration information of the reverse geocoding simulation function,
**Parameters**
- | Name| Type| Mandatory| Description|
+ | Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| mockInfos | Array<ReverseGeocodingMockInfo> | Yes | An array of configuration parameters indicating the inverse geocoding simulation function. The configuration parameters of the inverse geocoding simulation function include a location and a place name. |
**Return value**
- | Name| Description|
+ | Name| Description|
| -------- | -------- |
| Promise<void> | It is used to receive the execution result. If the execution is successful, it will return nullptr. Otherwise, it will return an error message. |
@@ -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) => {
diff --git a/zh-cn/application-dev/reference/apis/js-apis-geolocation.md b/zh-cn/application-dev/reference/apis/js-apis-geolocation.md
index af1e4a30179d3e012aabc248ccd460f15894b34a..3cd5bb1b94919b8e48c4b2c8b215254963bd05aa 100644
--- a/zh-cn/application-dev/reference/apis/js-apis-geolocation.md
+++ b/zh-cn/application-dev/reference/apis/js-apis-geolocation.md
@@ -22,13 +22,14 @@ on(type: 'locationChange', request: LocationRequest, callback: Callback<Locat
**系统能力**:SystemCapability.Location.Location.Core
-**参数**:
+**参数:**
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“locationChange”,表示位置变化。 |
| request | LocationRequest | 是 | 设置位置请求参数。 |
| callback | Callback<[Location](#location)> | 是 | 接收位置变化状态变化监听。 |
+
**示例**
@@ -52,9 +53,9 @@ off(type: 'locationChange', callback?: Callback<Location>) : void
**系统能力**:SystemCapability.Location.Location.Core
-**参数**:
+**参数:**
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“locationChange”,表示位置变化。 |
| callback | Callback<[Location](#location)> | 否 | 接收位置变化状态变化监听。 |
@@ -82,9 +83,9 @@ on(type: 'locationServiceState', callback: Callback<boolean>) : void
**系统能力**:SystemCapability.Location.Location.Core
-**参数**:
+**参数:**
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“locationServiceState”,表示位置服务状态。 |
| callback | Callback<boolean> | 是 | 接收位置服务状态变化监听。 |
@@ -112,7 +113,7 @@ off(type: 'locationServiceState', callback?: Callback<boolean>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“locationServiceState”,表示位置服务状态。 |
| callback | Callback<boolean> | 否 | 接收位置服务状态变化监听。 |
@@ -141,7 +142,7 @@ on(type: 'cachedGnssLocationsReporting', request: CachedGnssLocationsRequest, ca
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“cachedGnssLocationsReporting”,表示GNSS缓存定位结果上报。 |
| request | CachedGnssLocationsRequest | 是 | GNSS缓存功能配置参数 |
@@ -171,7 +172,7 @@ off(type: 'cachedGnssLocationsReporting', callback?: Callback<Array<Locati
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“cachedGnssLocationsReporting”,表示GNSS缓存定位结果上报。 |
| callback | Callback<boolean> | 否 | 接收GNSS缓存位置上报。 |
@@ -201,7 +202,7 @@ on(type: 'gnssStatusChange', callback: Callback<SatelliteStatusInfo>) : vo
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“gnssStatusChange”,表示订阅GNSS卫星状态信息上报。 |
| callback | Callback<SatelliteStatusInfo> | 是 | 接收GNSS卫星状态信息上报。 |
@@ -229,7 +230,7 @@ off(type: 'gnssStatusChange', callback?: Callback<SatelliteStatusInfo>) :
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“gnssStatusChange”,表示订阅GNSS卫星状态信息上报。 |
| callback | Callback<SatelliteStatusInfo> | 否 | 接收GNSS卫星状态信息上报。 |
@@ -257,7 +258,7 @@ on(type: 'nmeaMessageChange', callback: Callback<string>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“nmeaMessageChange”,表示订阅GNSS NMEA信息上报。 |
| callback | Callback<string> | 是 | 接收GNSS NMEA信息上报。 |
@@ -285,7 +286,7 @@ off(type: 'nmeaMessageChange', callback?: Callback<string>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“nmeaMessageChange”,表示订阅GNSS NMEA信息上报。 |
| callback | Callback<string> | 否 | 接收GNSS NMEA信息上报。 |
@@ -314,7 +315,7 @@ on(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“fenceStatusChange”,表示订阅围栏事件上报。 |
| request | GeofenceRequest | 是 | 围栏的配置参数。 |
@@ -359,7 +360,7 @@ off(type: 'fenceStatusChange', request: GeofenceRequest, want: WantAgent) : void
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“fenceStatusChange”,表示订阅围栏事件上报。 |
| request | GeofenceRequest | 是 | 围栏的配置参数。 |
@@ -402,7 +403,7 @@ on(type: 'countryCodeChange', callback: Callback<CountryCode>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“countryCodeChange”,表示订阅国家码信息上报。 |
| callback | Callback<CountryCode> | 是 | 接收国家码信息上报。 |
@@ -428,7 +429,7 @@ off(type: 'countryCodeChange', callback?: Callback<CountryCode>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“countryCodeChange”,表示取消订阅国家码信息上报。 |
| callback | Callback<CountryCode> | 是 | 接收国家码信息上报。 |
@@ -458,7 +459,7 @@ getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback<L
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [CurrentLocationRequest](#currentlocationrequest) | 否 | 设置位置请求参数。 |
| callback | AsyncCallback<[Location](#location)> | 是 | 用来接收位置信息的回调。 |
@@ -493,13 +494,13 @@ getCurrentLocation(request?: CurrentLocationRequest) : Promise<Location>
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [CurrentLocationRequest](#currentlocationrequest) | 否 | 设置位置请求参数。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<[Location](#location)> | 返回位置信息。 |
@@ -526,7 +527,7 @@ getLastLocation(callback: AsyncCallback<Location>) : void
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<[Location](#location)> | 是 | 用来接收上次位置的回调。 |
@@ -557,7 +558,7 @@ getLastLocation() : Promise<Location>
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<[Location](#location)> | 返回上次位置信息。 |
@@ -584,7 +585,7 @@ isLocationEnabled(callback: AsyncCallback<boolean>) : void
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | 是 | 用来接收位置服务状态的回调。 |
@@ -614,7 +615,7 @@ isLocationEnabled() : Promise<boolean>
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<boolean> | 返回位置服务是否可用的状态。 |
@@ -640,7 +641,7 @@ requestEnableLocation(callback: AsyncCallback<boolean>) : void
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | 是 | 用来接收位置服务状态的回调。 |
@@ -670,7 +671,7 @@ requestEnableLocation() : Promise<boolean>
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<boolean> | 返回位置服务是否可用。 |
@@ -697,7 +698,7 @@ enableLocation(callback: AsyncCallback<boolean>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | 是 | 用来接收位置服务状态的回调。 |
@@ -729,7 +730,7 @@ enableLocation() : Promise<boolean>
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<boolean> | 返回位置服务是否可用。 |
@@ -755,7 +756,7 @@ disableLocation(callback: AsyncCallback<boolean>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | 是 | 用来接收位置服务状态的回调。 |
@@ -787,7 +788,7 @@ disableLocation() : Promise<boolean>
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<boolean> | 返回位置服务是否可用。 |
@@ -811,7 +812,7 @@ isGeoServiceAvailable(callback: AsyncCallback<boolean>) : void
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | 是 | 用来接收地理编码服务状态的回调。 |
@@ -841,7 +842,7 @@ isGeoServiceAvailable() : Promise<boolean>
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<boolean> | 返回地理编码服务是否可用的状态。 |
@@ -866,7 +867,7 @@ getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [ReverseGeoCodeRequest](#reversegeocoderequest) | 是 | 设置逆地理编码请求的相关参数。 |
| callback | AsyncCallback<Array<[GeoAddress](#geoaddress)>> | 是 | 设置接收逆地理编码请求的回调参数。 |
@@ -898,13 +899,13 @@ getAddressesFromLocation(request: ReverseGeoCodeRequest) : Promise<Array<G
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [ReverseGeoCodeRequest](#reversegeocoderequest) | 是 | 设置逆地理编码请求的相关参数。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<Array<[GeoAddress](#geoaddress)>> | 返回地理描述信息。 |
@@ -930,7 +931,7 @@ getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback<
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [GeoCodeRequest](#geocoderequest) | 是 | 设置地理编码请求的相关参数。 |
| callback | AsyncCallback<Array<[GeoAddress](#geoaddress)>> | 是 | 设置接收地理编码请求的回调参数。 |
@@ -962,13 +963,13 @@ getAddressesFromLocationName(request: GeoCodeRequest) : Promise<Array<GeoA
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [GeoCodeRequest](#geocoderequest) | 是 | 设置地理编码请求的相关参数。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<Array<[GeoAddress](#geoaddress)>> | 设置接收地理编码请求的回调参数。 |
@@ -994,7 +995,7 @@ getCachedGnssLocationsSize(callback: AsyncCallback<number>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<number> | 是 | 用来接收GNSS芯片缓存位置个数的回调。 |
@@ -1024,7 +1025,7 @@ getCachedGnssLocationsSize() : Promise<number>;
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<number> | 返回GNSS缓存位置的个数。 |
@@ -1049,7 +1050,7 @@ flushCachedGnssLocations(callback: AsyncCallback<boolean>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<boolean> | 是 | 用来接收清空GNSS芯片缓存位置操作的结果。 |
@@ -1079,7 +1080,7 @@ flushCachedGnssLocations() : Promise<boolean>;
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<boolean> | 清空所有GNSS缓存位置是否成功。 |
@@ -1104,7 +1105,7 @@ sendCommand(command: LocationCommand, callback: AsyncCallback<boolean>) :
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| command | LocationCommand | 是 | 指定目标场景,和将要发送的命令(字符串)。 |
| callback | AsyncCallback<boolean> | 是 | 用来接收命令发送的结果。 |
@@ -1136,13 +1137,13 @@ sendCommand(command: LocationCommand) : Promise<boolean>;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| command | LocationCommand | 是 | 指定目标场景,和将要发送的命令(字符串)。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<boolean> | 表示命令发送成功或失败。 |
@@ -1170,7 +1171,7 @@ isLocationPrivacyConfirmed(type : LocationPrivacyType, callback: AsyncCallback&l
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | 是 | 指定隐私申明场景,例如开机向导中的隐私申明、开启网络定位功能时弹出的隐私申明等。 |
| callback | AsyncCallback<boolean> | 是 | 表示用户是否同意定位服务隐私申明。 |
@@ -1203,13 +1204,13 @@ isLocationPrivacyConfirmed(type : LocationPrivacyType,) : Promise<boolean>
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | 是 | 指定隐私申明场景,例如开机向导中的隐私申明、开启网络定位功能时弹出的隐私申明等。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<boolean> | 表示用户是否同意定位服务隐私申明。 |
@@ -1236,7 +1237,7 @@ setLocationPrivacyConfirmStatus(type : LocationPrivacyType, isConfirmed: boolean
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | 是 | 指定隐私申明场景,例如开机向导中的隐私申明、开启网络定位功能时弹出的隐私申明等。 |
| isConfirmed | boolean | 是 | 表示用户是否同意定位服务隐私申明。 |
@@ -1270,14 +1271,14 @@ setLocationPrivacyConfirmStatus(type : LocationPrivacyType, isConfirmed : boolea
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | 是 | 指定隐私申明场景,例如开机向导中的隐私申明、开启网络定位功能时弹出的隐私申明等。 |
| isConfirmed | boolean | 是 | 表示用户是否同意定位服务隐私申明。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<boolean> | 表示操作是否成功。 |
@@ -1300,7 +1301,7 @@ getCountryCode(callback: AsyncCallback<CountryCode>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<CountryCode> | 是 | 用来接收国家码。 |
@@ -1332,7 +1333,7 @@ getCountryCode() : Promise<CountryCode>;
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<CountryCode> | 返回国家码。 |
@@ -1361,7 +1362,7 @@ enableLocationMock(scenario?: LocationRequestScenario, callback: AsyncCallback&l
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | 否 | 指示在什么场景下使能位置模拟功能。 |
| callback | AsyncCallback<void> | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1392,14 +1393,14 @@ enableLocationMock(scenario?: LocationRequestScenario) : Promise<void>;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | 否 | 指示使能什么场景的位置模拟功能。如果不携带该参数则表示使能所有场景的位置模拟功能。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<void> | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1433,7 +1434,7 @@ disableLocationMock(scenario?: LocationRequestScenario, callback: AsyncCallback&
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | 否 | 指示去使能某个场景的位置模拟功能。如果不携带该参数则表示去使能所有场景的位置模拟功能。 |
| callback | AsyncCallback<void> | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1465,13 +1466,13 @@ disableLocationMock(scenario?: LocationRequestScenario) : Promise<void>;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | 否 | 指示去使能某个场景的位置模拟功能。如果不携带该参数则表示去使能所有场景的位置模拟功能。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<void> | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1505,7 +1506,7 @@ setMockedLocations(config: LocationMockConfig, callback: AsyncCallback<void&g
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| config | LocationMockConfig | 是 | 指示位置模拟的配置参数,包含模拟位置上报的时间间隔和模拟位置数组。 |
| callback | AsyncCallback<void> | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1543,13 +1544,13 @@ setMockedLocations(config: LocationMockConfig) : Promise<void>;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| config | LocationMockConfig | 是 | 指示位置模拟的配置参数,包含模拟位置上报的时间间隔和模拟位置数组。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<void> | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1591,7 +1592,7 @@ enableReverseGeocodingMock(callback: AsyncCallback<void>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<void> | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1625,7 +1626,7 @@ enableReverseGeocodingMock() : Promise<void>;
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<void> | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1658,7 +1659,7 @@ disableReverseGeocodingMock(callback: AsyncCallback<void>) : void;
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback<void> | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1692,7 +1693,7 @@ disableReverseGeocodingMock() : Promise<void>;
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<void> | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -1725,7 +1726,7 @@ setReverseGeocodingMockInfo(mockInfos: Array<ReverseGeocodingMockInfo>, ca
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| mockInfos | Array<ReverseGeocodingMockInfo> | 是 | 指示逆地理编码模拟功能的配置参数数组。逆地理编码模拟功能的配置参数包含了一个位置和一个地名。 |
| callback | AsyncCallback<void> | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -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) {
@@ -1763,13 +1764,13 @@ setReverseGeocodingMockInfo(mockInfos: Array<ReverseGeocodingMockInfo>) :
**参数**:
- | 参数名 | 类型 | 必填 | 说明 |
+ | 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| mockInfos | Array<ReverseGeocodingMockInfo> | 是 | 指示逆地理编码模拟功能的配置信息数组。逆地理编码模拟功能的配置信息包含了一个位置和一个地名。 |
**返回值**:
- | 参数名 | 说明 |
+ | 参数名 | 说明 |
| -------- | -------- |
| Promise<void> | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
@@ -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) => {
diff --git a/zh-cn/readme/figures/location_En-1.png b/zh-cn/readme/figures/location_En-1.png
new file mode 100644
index 0000000000000000000000000000000000000000..1ae4bcd7173f2e95004c96fa13d420c09f017f76
Binary files /dev/null and b/zh-cn/readme/figures/location_En-1.png differ
diff --git a/zh-cn/readme/figures/location_zh-1.png b/zh-cn/readme/figures/location_zh-1.png
new file mode 100644
index 0000000000000000000000000000000000000000..3638a47483ec2e0f0d8443e3ab2410b333886118
Binary files /dev/null and b/zh-cn/readme/figures/location_zh-1.png differ
diff --git "a/zh-cn/readme/\344\275\215\347\275\256\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237.md" "b/zh-cn/readme/\344\275\215\347\275\256\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237.md"
index 4eb10f45572aa713365606b167267265bde94edb..62c1be27a8e6dda14147674172ed944bdd361cbe 100644
--- "a/zh-cn/readme/\344\275\215\347\275\256\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237.md"
+++ "b/zh-cn/readme/\344\275\215\347\275\256\346\234\215\345\212\241\345\255\220\347\263\273\347\273\237.md"
@@ -40,7 +40,7 @@
**图 1** **子系统架构图**
-![](figures/zh-1.png)
+![](figures/location_zh-1.png)
## 目录