2.2.2 • Published 6 months ago

@local-logic/lat-client v2.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

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"}
</button>

); }

2.2.1

7 months ago

2.1.2

8 months ago

2.2.0

7 months ago

2.1.1

9 months ago

2.1.4

8 months ago

2.2.2

6 months ago

2.1.3

8 months ago

2.1.0

9 months ago

2.0.2

12 months ago

2.0.1

1 year ago

2.0.0

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago