| isGeoServiceAvailable(callback: AsyncCallback<boolean>) : void | Checks whether the (reverse) geocoding service is available. This function uses an asynchronous callback to return the result. |
| isGeoServiceAvailable() : Promise<boolean> | Checks whether the (reverse) geocoding service is available. This function uses a promise to return the result. |
| getAddressesFromLocation(request: ReverseGeoCodeRequest, callback: AsyncCallback<Array<GeoAddress>>) : void | Converts coordinates into geographic description through reverse geocoding. This function uses an asynchronous callback to return the result. |
| getAddressesFromLocation(request: ReverseGeoCodeRequest) : Promise<Array<GeoAddress>>; | Converts coordinates into geographic description through reverse geocoding. This function uses a promise to return the result. |
| getAddressesFromLocationName(request: GeoCodeRequest, callback: AsyncCallback<Array<GeoAddress>>) : void | Converts geographic description into coordinates through geocoding. This function uses an asynchronous callback to return the result. |
| getAddressesFromLocationName(request: GeoCodeRequest) : Promise<Array<GeoAddress>> | Converts geographic description into coordinates through geocoding. This function uses a promise to return the result. |
> The **GeoConvert** instance needs to access backend services to obtain information. Therefore, before performing the following steps, ensure that your device is connected to the network.
1. Import the **geolocation** module by which you can implement all APIs related to the geocoding and reverse geocoding conversion capabilities.
...
...
@@ -45,7 +46,7 @@ The following table describes APIs available for mutual conversion between coord
});
```
Your application can obtain the **GeoAddress** list that matches the specified coordinates and then read location information from it. For details, see the _API Reference_.
Your application can obtain the **GeoAddress** list that matches the specified coordinates and then read location information from it. For details, see [Geolocation](../reference/apis/js-apis-geolocation.md).
- Call **getAddressesFromLocationName** to convert geographic description into coordinates.
```
...
...
@@ -55,6 +56,6 @@ The following table describes APIs available for mutual conversion between coord
});
```
Your application can obtain the **GeoAddress** list that matches the specified location information and read coordinates from it. For details, see the _API Reference_.
Your application can obtain the **GeoAddress** list that matches the specified location information and read coordinates from it. For details, see [Geolocation](../reference/apis/js-apis-geolocation.md).
To improve the accuracy of location results, you can set the longitude and latitude ranges in **GeoCodeRequest**.
Enables listening for combination key events. When a combination key event that meets the specified conditions occurs, **KeyOptions** will be passed as an input parameter to **callback**.
| type | string | Yes| Type of the key input event to listen for. Only **key** is supported.|
| keyOptions | [KeyOptions](#keyoption) | Yes| Key option, which specifies the condition for combination key input.|
| callback | Callback<KeyOptions> | Yes| Callback used to return the result. When a key input event that meets the specified options occurs, **keyOptions** will be passed as an input parameter to **callback**.|
| keyOptions | [keyOptions](#keyoptions) | Yes| Key option, which specifies the condition for combination key input.|
| callback | Callback<[keyOptions](#keyoptions)> | Yes| Callback used to return the result. When a key input event that meets the specified options occurs, **keyOptions** will be passed as an input parameter to **callback**.|
@@ -57,16 +60,16 @@ Stops listening for combination key events.
| Name| Type| Mandatory| Description|
| -------- | -------- | -------- | -------- |
| type | string | Yes| Type of the key input event to listen for. Only **key** is supported.|
| keyOptions | [KeyOptions](#keyoption) | Yes| Key options passed to the key input event when listening starts.|
| callback | Callback<KeyOptions> | Yes| Callback function passed to the key input event with the key options when listening starts.|
| keyOptions | [keyOptions](#keyoptions) | Yes| Key options passed to the key input event when listening starts.|
| callback | Callback<[keyOptions](#keyoptions)> | Yes| Callback function passed to the key input event with the key option when listening starts.|
| id | number | Unique identifier of an input device. If the same physical device is repeatedly inserted and removed, its ID changes. |
| name | string | Name of the input device. |
| sources | Array<[SourceType](#sourcetype)> | Source types of the input device. For example, if a keyboard is attached with a touchpad, the device has two input sources: keyboard and touchpad. |
| axisRanges | Array<[axisRanges](#axisrange)> | Axis information of the input device. |
| bus | number | Bus type of the input device. |
| product | number | Product information of the input device. |
| vendor | number | Vendor information of the input device. |
| version | number | Version information of the input device. |
| phys | string | Physical address of the input device. |
| uniq | string | Unique ID of the input device. |
## AxisType
Defines the axis type of an input device, which is **NULL**.
| id | number | Unique ID of the input device. If the same physical device is repeatedly inserted and removed, its ID changes. |
| name | string | Name of the input device. |
| sources | Array<[SourceType](#sourcetype)> | Source type of the input device. For example, if a keyboard is attached with a touchpad, the device has two input sources: keyboard and touchpad.|
| axisRanges | Array<[axisRanges](#axisrange)> | Axis information of the input device. |
## AxisType<sup>9+</sup>
Defines the axis type of an input device.
## AxisRange
...
...
@@ -154,7 +154,7 @@ Defines the axis information of an input device.
## SourceType
Enumerates the input source types. For example, if a mouse reports an x-axis event, the source of the x-axis is the mouse.
Enumerates the input source types of the axis. For example, if a mouse reports an x-axis event, the source of the x-axis is the mouse.
The input event client provides the key injection capability.
> **NOTE**
>
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
>
> The APIs of this module are system APIs and cannot be called by third-party applications.
> - The APIs of this module are system APIs and cannot be called by third-party applications.
The input monitor module implements listening for global touch events.
> **NOTE**<br>
> - The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Represents the class of the callback used to return the touch event. The value **true** indicates that the touch event has been consumed, and the value **false** indicates the opposite.
Represents the class of the callback used to return the touch event. If the value **true** is returned, the touch event has been consumed, and the event monitor will be closed.
### (touchEvent: TouchEvent): Boolean
Represents the callback used to return the touch event. You need to define the name of the callback function in the correct format. Ensure that the input parameter is of the **TouchEvent** type, and the return value is of the **Boolean** type.