Socket
Book a DemoInstallSign in
Socket

@local-logic/lat-client

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@local-logic/lat-client

The `@local-logic/lat-client` package allows you to download or preview Local Logic Logic Location Assessment Tool (LAT).

unpublished
latest
npmnpm
Version
2.2.2
Version published
Maintainers
5
Created
Source

Local Logic Location Assessment Tool (LAT)

The @local-logic/lat-client package allows you to download or preview Local Logic Logic Location Assessment Tool (LAT).

Getting started

Installation

First, install with yarn, pnpm, or npm:

yarn add @local-logic/lat-client
pnpm add @local-logic/lat-client
npm i --save @local-logic/lat-client

Usage

You can now import LatClient:

import LatClient from "@local-logic/lat-client";

const latClient = LatClient(
  "<API_KEY>", {
    lat: 45.528130, // Your address latitude
    lng: -73.598100, // Your address longitude
    addressLabel: "5605 Av. de Gaspé #304, Montreal, Quebec H2T 2A4",
  });

You can use the .open() method.

ℹ️ You should only call this method within an 'click' event handler. Otherwise, this event may be treated as popup events by the browser.

Open Example

const button = document.createElement("button");
button.innerText = "Open Preview";
button.onclick = () => latClient.open();
document.body.appendChild(button);

#### React Example

import { useState } from "react"; import LatClient from "@local-logic/lat-client";

const latClient = LatClient( "<API_KEY>", { lat: 45.52813, // Your address latitude lng: -73.5981, // Your address longitude addressLabel: "5605 Av. de Gaspé #304, Montreal, Quebec H2T 2A4" } );

export default function App() { const [downloading, setDownloading] = useState(false);

return ( <button onClick={async () => { setDownloading(true); latClient.open(); setDownloading(false); }} disabled={downloading} > {downloading ? "Downloading..." : "Download"} ); }

FAQs

Package last updated on 08 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts