SDKsWASM
Create a location message
Create a location message with the WASM SDK.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
description | string | Yes | Location name or address description. |
longitude | number | Yes | Longitude. |
latitude | number | Yes | Latitude. |
const { data: message } = await openimsdk.createLocationMessage({
description: 'Pudong, Shanghai',
longitude: 121.4737,
latitude: 31.2304,
});Obtain the location only after receiving the user's permission, and control its precision according to your product's privacy policy. When the Promise resolves, it returns only a pending message object.
Was this page helpful?