提交 19b0f85e 编写于 作者: L liu-binjun

bugfix:Modify the format error problem

Signed-off-by: Nliu-binjun <liubinjun@huawei.com>
上级 c731bd37
......@@ -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&lt;[Location](#location)&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;SatelliteStatusInfo&gt; | 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&lt;SatelliteStatusInfo&gt; | 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&lt;string&gt; | 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&lt;string&gt; | 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&lt;CountryCode&gt; | 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&lt;CountryCode&gt; | 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&lt;[Location](#location)&gt; | 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&lt;[Location](#location)&gt; | 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&lt;[Location](#location)&gt; | 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&lt;[Location](#location)&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;Array&lt;[GeoAddress](#geoaddress)&gt;&gt; | 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&lt;Array&lt;[GeoAddress](#geoaddress)&gt;&gt; | 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&lt;Array&lt;[GeoAddress](#geoaddress)&gt;&gt; | 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&lt;Array&lt;[GeoAddress](#geoaddress)&gt;&gt; | 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&lt;number&gt; | 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&lt;number&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;boolean&gt; | 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&lt;CountryCode&gt; | Yes | Callback is used to receive the country code. |
......@@ -1332,7 +1332,7 @@ None
**Return value**
| Name| Description|
| Name| Description|
| -------- | -------- |
| Promise&lt;CountryCode&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;void&gt; | 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&lt;ReverseGeocodingMockInfo&gt; | 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&lt;void&gt; | 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&lt;ReverseGeocodingMockInfo&gt; | 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&lt;void&gt; | 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) => {
......
......@@ -22,13 +22,14 @@ on(type: 'locationChange', request: LocationRequest, callback: Callback&lt;Locat
**系统能力**:SystemCapability.Location.Location.Core
**参数**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“locationChange”,表示位置变化。 |
| request | LocationRequest | 是 | 设置位置请求参数。 |
| callback | Callback&lt;[Location](#location)&gt; | 是 | 接收位置变化状态变化监听。 |
**示例**
......@@ -52,9 +53,9 @@ off(type: 'locationChange', callback?: Callback&lt;Location&gt;) : void
**系统能力**:SystemCapability.Location.Location.Core
**参数**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“locationChange”,表示位置变化。 |
| callback | Callback&lt;[Location](#location)&gt; | 否 | 接收位置变化状态变化监听。 |
......@@ -82,9 +83,9 @@ on(type: 'locationServiceState', callback: Callback&lt;boolean&gt;) : void
**系统能力**:SystemCapability.Location.Location.Core
**参数**
**参数:**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“locationServiceState”,表示位置服务状态。 |
| callback | Callback&lt;boolean&gt; | 是 | 接收位置服务状态变化监听。 |
......@@ -112,7 +113,7 @@ off(type: 'locationServiceState', callback?: Callback&lt;boolean&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“locationServiceState”,表示位置服务状态。 |
| callback | Callback&lt;boolean&gt; | 否 | 接收位置服务状态变化监听。 |
......@@ -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&lt;Array&lt;Locati
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“cachedGnssLocationsReporting”,表示GNSS缓存定位结果上报。 |
| callback | Callback&lt;boolean&gt; | 否 | 接收GNSS缓存位置上报。 |
......@@ -201,7 +202,7 @@ on(type: 'gnssStatusChange', callback: Callback&lt;SatelliteStatusInfo&gt;) : vo
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“gnssStatusChange”,表示订阅GNSS卫星状态信息上报。 |
| callback | Callback&lt;SatelliteStatusInfo&gt; | 是 | 接收GNSS卫星状态信息上报。 |
......@@ -229,7 +230,7 @@ off(type: 'gnssStatusChange', callback?: Callback&lt;SatelliteStatusInfo&gt;) :
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“gnssStatusChange”,表示订阅GNSS卫星状态信息上报。 |
| callback | Callback&lt;SatelliteStatusInfo&gt; | 否 | 接收GNSS卫星状态信息上报。 |
......@@ -257,7 +258,7 @@ on(type: 'nmeaMessageChange', callback: Callback&lt;string&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“nmeaMessageChange”,表示订阅GNSS&nbsp;NMEA信息上报。 |
| callback | Callback&lt;string&gt; | 是 | 接收GNSS&nbsp;NMEA信息上报。 |
......@@ -285,7 +286,7 @@ off(type: 'nmeaMessageChange', callback?: Callback&lt;string&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“nmeaMessageChange”,表示订阅GNSS&nbsp;NMEA信息上报。 |
| callback | Callback&lt;string&gt; | 否 | 接收GNSS&nbsp;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&lt;CountryCode&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“countryCodeChange”,表示订阅国家码信息上报。 |
| callback | Callback&lt;CountryCode&gt; | 是 | 接收国家码信息上报。 |
......@@ -428,7 +429,7 @@ off(type: 'countryCodeChange', callback?: Callback&lt;CountryCode&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | string | 是 | 设置事件类型。type为“countryCodeChange”,表示取消订阅国家码信息上报。 |
| callback | Callback&lt;CountryCode&gt; | 是 | 接收国家码信息上报。 |
......@@ -458,7 +459,7 @@ getCurrentLocation(request: CurrentLocationRequest, callback: AsyncCallback&lt;L
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [CurrentLocationRequest](#currentlocationrequest) | 否 | 设置位置请求参数。 |
| callback | AsyncCallback&lt;[Location](#location)&gt; | 是 | 用来接收位置信息的回调。 |
......@@ -493,13 +494,13 @@ getCurrentLocation(request?: CurrentLocationRequest) : Promise&lt;Location&gt;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [CurrentLocationRequest](#currentlocationrequest) | 否 | 设置位置请求参数。 |
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;[Location](#location)&gt; | 返回位置信息。 |
......@@ -526,7 +527,7 @@ getLastLocation(callback: AsyncCallback&lt;Location&gt;) : void
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;[Location](#location)&gt; | 是 | 用来接收上次位置的回调。 |
......@@ -557,7 +558,7 @@ getLastLocation() : Promise&lt;Location&gt;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;[Location](#location)&gt; | 返回上次位置信息。 |
......@@ -584,7 +585,7 @@ isLocationEnabled(callback: AsyncCallback&lt;boolean&gt;) : void
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 用来接收位置服务状态的回调。 |
......@@ -614,7 +615,7 @@ isLocationEnabled() : Promise&lt;boolean&gt;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;boolean&gt; | 返回位置服务是否可用的状态。 |
......@@ -640,7 +641,7 @@ requestEnableLocation(callback: AsyncCallback&lt;boolean&gt;) : void
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 用来接收位置服务状态的回调。 |
......@@ -670,7 +671,7 @@ requestEnableLocation() : Promise&lt;boolean&gt;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;boolean&gt; | 返回位置服务是否可用。 |
......@@ -697,7 +698,7 @@ enableLocation(callback: AsyncCallback&lt;boolean&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 用来接收位置服务状态的回调。 |
......@@ -729,7 +730,7 @@ enableLocation() : Promise&lt;boolean&gt;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;boolean&gt; | 返回位置服务是否可用。 |
......@@ -755,7 +756,7 @@ disableLocation(callback: AsyncCallback&lt;boolean&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 用来接收位置服务状态的回调。 |
......@@ -787,7 +788,7 @@ disableLocation() : Promise&lt;boolean&gt;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;boolean&gt; | 返回位置服务是否可用。 |
......@@ -811,7 +812,7 @@ isGeoServiceAvailable(callback: AsyncCallback&lt;boolean&gt;) : void
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 用来接收地理编码服务状态的回调。 |
......@@ -841,7 +842,7 @@ isGeoServiceAvailable() : Promise&lt;boolean&gt;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;boolean&gt; | 返回地理编码服务是否可用的状态。 |
......@@ -866,7 +867,7 @@ getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [ReverseGeoCodeRequest](#reversegeocoderequest) | 是 | 设置逆地理编码请求的相关参数。 |
| callback | AsyncCallback&lt;Array&lt;[GeoAddress](#geoaddress)&gt;&gt; | 是 | 设置接收逆地理编码请求的回调参数。 |
......@@ -898,13 +899,13 @@ getAddressesFromLocation(request: ReverseGeoCodeRequest) : Promise&lt;Array&lt;G
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [ReverseGeoCodeRequest](#reversegeocoderequest) | 是 | 设置逆地理编码请求的相关参数。 |
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;Array&lt;[GeoAddress](#geoaddress)&gt;&gt; | 返回地理描述信息。 |
......@@ -930,7 +931,7 @@ getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback&lt
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [GeoCodeRequest](#geocoderequest) | 是 | 设置地理编码请求的相关参数。 |
| callback | AsyncCallback&lt;Array&lt;[GeoAddress](#geoaddress)&gt;&gt; | 是 | 设置接收地理编码请求的回调参数。 |
......@@ -962,13 +963,13 @@ getAddressesFromLocationName(request: GeoCodeRequest) : Promise&lt;Array&lt;GeoA
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| request | [GeoCodeRequest](#geocoderequest) | 是 | 设置地理编码请求的相关参数。 |
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;Array&lt;[GeoAddress](#geoaddress)&gt;&gt; | 设置接收地理编码请求的回调参数。 |
......@@ -994,7 +995,7 @@ getCachedGnssLocationsSize(callback: AsyncCallback&lt;number&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;number&gt; | 是 | 用来接收GNSS芯片缓存位置个数的回调。 |
......@@ -1024,7 +1025,7 @@ getCachedGnssLocationsSize() : Promise&lt;number&gt;;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;number&gt; | 返回GNSS缓存位置的个数。 |
......@@ -1049,7 +1050,7 @@ flushCachedGnssLocations(callback: AsyncCallback&lt;boolean&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 用来接收清空GNSS芯片缓存位置操作的结果。 |
......@@ -1079,7 +1080,7 @@ flushCachedGnssLocations() : Promise&lt;boolean&gt;;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;boolean&gt; | 清空所有GNSS缓存位置是否成功。 |
......@@ -1104,7 +1105,7 @@ sendCommand(command: LocationCommand, callback: AsyncCallback&lt;boolean&gt;) :
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| command | LocationCommand | 是 | 指定目标场景,和将要发送的命令(字符串)。 |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 用来接收命令发送的结果。 |
......@@ -1136,13 +1137,13 @@ sendCommand(command: LocationCommand) : Promise&lt;boolean&gt;;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| command | LocationCommand | 是 | 指定目标场景,和将要发送的命令(字符串)。 |
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;boolean&gt; | 表示命令发送成功或失败。 |
......@@ -1170,7 +1171,7 @@ isLocationPrivacyConfirmed(type : LocationPrivacyType, callback: AsyncCallback&l
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | 是 | 指定隐私申明场景,例如开机向导中的隐私申明、开启网络定位功能时弹出的隐私申明等。 |
| callback | AsyncCallback&lt;boolean&gt; | 是 | 表示用户是否同意定位服务隐私申明。 |
......@@ -1203,13 +1204,13 @@ isLocationPrivacyConfirmed(type : LocationPrivacyType,) : Promise&lt;boolean&gt;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| type | LocationPrivacyType | 是 | 指定隐私申明场景,例如开机向导中的隐私申明、开启网络定位功能时弹出的隐私申明等。 |
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;boolean&gt; | 表示用户是否同意定位服务隐私申明。 |
......@@ -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&lt;boolean&gt; | 表示操作是否成功。 |
......@@ -1300,7 +1301,7 @@ getCountryCode(callback: AsyncCallback&lt;CountryCode&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;CountryCode&gt; | 是 | 用来接收国家码。 |
......@@ -1332,7 +1333,7 @@ getCountryCode() : Promise&lt;CountryCode&gt;;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;CountryCode&gt; | 返回国家码。 |
......@@ -1361,7 +1362,7 @@ enableLocationMock(scenario?: LocationRequestScenario, callback: AsyncCallback&l
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | 否 | 指示在什么场景下使能位置模拟功能。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1392,14 +1393,14 @@ enableLocationMock(scenario?: LocationRequestScenario) : Promise&lt;void&gt;;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | 否 | 指示使能什么场景的位置模拟功能。如果不携带该参数则表示使能所有场景的位置模拟功能。 |
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1433,7 +1434,7 @@ disableLocationMock(scenario?: LocationRequestScenario, callback: AsyncCallback&
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | 否 | 指示去使能某个场景的位置模拟功能。如果不携带该参数则表示去使能所有场景的位置模拟功能。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1465,13 +1466,13 @@ disableLocationMock(scenario?: LocationRequestScenario) : Promise&lt;void&gt;;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| scenario | LocationRequestScenario | 否 | 指示去使能某个场景的位置模拟功能。如果不携带该参数则表示去使能所有场景的位置模拟功能。 |
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1505,7 +1506,7 @@ setMockedLocations(config: LocationMockConfig, callback: AsyncCallback&lt;void&g
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| config | LocationMockConfig | 是 | 指示位置模拟的配置参数,包含模拟位置上报的时间间隔和模拟位置数组。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1543,13 +1544,13 @@ setMockedLocations(config: LocationMockConfig) : Promise&lt;void&gt;;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| config | LocationMockConfig | 是 | 指示位置模拟的配置参数,包含模拟位置上报的时间间隔和模拟位置数组。 |
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1591,7 +1592,7 @@ enableReverseGeocodingMock(callback: AsyncCallback&lt;void&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;void&gt; | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1625,7 +1626,7 @@ enableReverseGeocodingMock() : Promise&lt;void&gt;;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1658,7 +1659,7 @@ disableReverseGeocodingMock(callback: AsyncCallback&lt;void&gt;) : void;
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| callback | AsyncCallback&lt;void&gt; | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1692,7 +1693,7 @@ disableReverseGeocodingMock() : Promise&lt;void&gt;;
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1725,7 +1726,7 @@ setReverseGeocodingMockInfo(mockInfos: Array&lt;ReverseGeocodingMockInfo&gt;, ca
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| mockInfos | Array&lt;ReverseGeocodingMockInfo&gt; | 是 | 指示逆地理编码模拟功能的配置参数数组。逆地理编码模拟功能的配置参数包含了一个位置和一个地名。 |
| callback | AsyncCallback&lt;void&gt; | 是 | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1734,11 +1735,11 @@ setReverseGeocodingMockInfo(mockInfos: Array&lt;ReverseGeocodingMockInfo&gt;, 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&lt;ReverseGeocodingMockInfo&gt;) :
**参数**
| 参数名 | 类型 | 必填 | 说明 |
| 参数名 | 类型 | 必填 | 说明 |
| -------- | -------- | -------- | -------- |
| mockInfos | Array&lt;ReverseGeocodingMockInfo&gt; | 是 | 指示逆地理编码模拟功能的配置信息数组。逆地理编码模拟功能的配置信息包含了一个位置和一个地名。 |
**返回值**
| 参数名 | 说明 |
| 参数名 | 说明 |
| -------- | -------- |
| Promise&lt;void&gt; | 用来接收执行结果,如果执行成功就返回nullptr,否则就返回错误信息。 |
......@@ -1777,11 +1778,11 @@ setReverseGeocodingMockInfo(mockInfos: Array&lt;ReverseGeocodingMockInfo&gt;) :
```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) => {
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册