For the complete documentation index, see llms.txt. This page is also available as Markdown.

Lokasi Terkini

Mendapatkan lokasi terkini pengguna

Nama function yang digunakan adalah

GetLocation()

Contoh

Berikut ini merupakan contoh dalam penggunaan

import { InaLib } from "ina-digital-sdk";
const inaLib = new InaLib({ mode: 'prod', secret_key: '{your_secret_key}' })
inaLib.GetLocation()
		.then(function (response) {
			console.log(response);
		})
		.catch(function (error) {
			console.log(error);
		});

Maka output yang akan keluar adalah

[object GeolocationPosition] {
  "coords": [object GeolocationCoordinates] {
    "accuracy": 14.322,
    "altitude": null,
    "altitudeAccuracy": null,
    "heading": null,
    "latitude": -6.276771,
    "longitude": 106.9733794,
    "speed": null
  },
  "timestamp": 1709635831376
}

Last updated