# leaflet-nearmap

> Nearmap CRS for leaflet library

Latest version **1.0.2** (published 2018-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install leaflet-nearmap
pnpm add leaflet-nearmap
yarn add leaflet-nearmap
bun add leaflet-nearmap
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-11-07 |
| First published | 2018-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0 |
| Dependencies | 1 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | kollhof, nearmap-admin, nickmanks |

## Links

- npm: https://www.npmjs.com/package/leaflet-nearmap
- Repository: https://github.com/nearmap/leaflet-nearmap
- Issues: https://github.com/nearmap/leaflet-nearmap/issues
- npm.io page: https://npm.io/package/leaflet-nearmap

## Dependencies (1)

- [leaflet](https://npm.io/package/leaflet.md) ^1.3.4

## Recent versions

- 1.0.2 (latest) — 2018-11-07
- 1.0.1 — 2018-11-06
- 1.0.0 — 2018-11-01

## README

# leaflet-nearmap
Use leaflet library with Nearmap's Tile API.


## Installation

```bash
npm install --save-dev leaflet-nearmap
```

## Usage

Follow the [Leaflet docs](https://leafletjs.com/reference-1.3.4.html)
for setting up a basic map.

Import custom CRS for panoramas to initialize the map, and add the respective
layer:

```js
import leaflet from 'leaflet';
import northCrs from 'leaflet-nearmap/crs/north';
import northLayer from 'leaflet-nearmap/layers/north';

const ApiKey = 'YOUR_API_KEY';
const UrlTemplate = `https://api.nearmap.com/tiles/v3/{layer}/{z}/{x}/{y}.img?tertiary=satellite&apikey=${ApiKey}`;

const map = leaflet.map('mapid', {
  crs: northCrs,
  center: [-34.915302, 138.595637],
  zoom: 13
});

map.addLayer(northLayer(UrlTemplate));
```


See [./examples/index.js](./examples/index.js) for more details.


## Running the Examples

Make sure you have a recent version of node installed.
Clone or download this repo and run the following:

```bash
npm ci
npx run
```

This starts a webserver and you can explore the demo at http://localhost:8080/

---
_Source: https://npm.io/package/leaflet-nearmap · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
