# new-nepal-topojson

> An npm package that provides topojson data for new administrative boundaries of Nepal.

Latest version **1.6.1** (published 2017-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install new-nepal-topojson
pnpm add new-nepal-topojson
yarn add new-nepal-topojson
bun add new-nepal-topojson
```

## 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.6.1 |
| Published | 2017-08-11 |
| First published | 2017-07-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Arogya Koirala |
| Maintainers | arkoblog |

## Links

- npm: https://www.npmjs.com/package/new-nepal-topojson
- npm.io page: https://npm.io/package/new-nepal-topojson

## Recent versions

- 1.6.1 (latest) — 2017-08-11
- 1.6.0 — 2017-07-06
- 1.5.0 — 2017-07-06
- 1.4.0 — 2017-07-06
- 1.3.0 — 2017-07-06
- 1.2.5 — 2017-07-06
- 1.2.4 — 2017-07-06
- 1.2.3 — 2017-07-06
- 1.2.2 — 2017-07-06
- 1.2.1 — 2017-07-06
- 1.2.0 — 2017-07-06
- 1.1.1 — 2017-07-02
- 1.1.0 — 2017-07-02
- 1.0.0 — 2017-07-02

## README

# new-nepal-topojson

This module simply provides a topojson file that contains new administrative boundaries for Nepal.

## Usage
Import the module through npm:
`npm install new-nepal-topojson`


After importing you can easily use the topojson through leaflet as follows:

```javascript
import L from 'leaflet';
import { municipalities } from 'new-nepal-topojson';
import { districts } from 'new-nepal-topojson';

// some javascript code to initialize Leaflet Map here

L.TopoJSON = L.GeoJSON.extend({
  addData(jsonData) {
    if (jsonData.type === 'Topology') {
      for (const key in jsonData.objects) {
        const geojson = topojson.feature(jsonData, jsonData.objects[key]);
        L.GeoJSON.prototype.addData.call(this, geojson);
      }
    } else {
      L.GeoJSON.prototype.addData.call(this, jsonData);
    }
  },
});

const topoLayer = new L.TopoJSON();
topoLayer.addData(municipalities);
topoLayer.addData(districts)
topoLayer.addTo(map);

```

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