location

Message. location

new location()

location message
Returns:
message:object

Methods

set(options)

Building location message
Example
let message = New Message('location', id); message.set({to: 'user1', addr: 'Tom's home', lat: 51.50, lng:-0.12, chatType: 'singleChat', success: function(){}, fail: function(){}})
Parameters:
Name Type Description
options Object -
Properties
Name Type Description
to String The userId of the message recipient, group ID, or chat room ID
addr String address
lat Number latitud
lng Number longitude
ext Object The message extension
chatType String chat type, optional value: singleChat、groupChat、chatRoom
success function A callback that the message was sent successfully
fail function Callback for message sending failure
Returns:
Void