Initialize()
the package with the publishable key. This will return an instance of our client.client.setCallback(fn)
projectSubscription()
takes no parametersgroupSubscription(greoupID)
- takes in group ID as parameteruserSubscription(userID)
- takes in a single user ID or an array of user ids as parametersubscribe()
method on the created subscription to start receiving realtime location datadisconnect()
call disconnect method on client. Please find the example usage below:Initialize()
function takes in the publishable key as a parameter. You can get the publishable key from our dashboard once you create a project. Initialize returns a promise of our client.projectSubscription()
method of client. It does not take in any parameter.groupSubscription(groupID)
method of the client. It takes the group ID as a parameter.userSubscription(groupID)
method of client. It takes the user ID as a parameter.unsubscribe()
method.disconnect()
method on the client.examples/
. To run the example, clone this repository, add your sdk key as an environment variable pk
and run the app.