# leaflet-stream

> Pipe geojson into a map

Latest version **1.1.0** (published 2015-02-25) · MIT license · 0 weekly downloads

## Install

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

## 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.1.0 |
| Published | 2015-02-25 |
| First published | 2015-02-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Finn Pauls |
| Maintainers | finnpauls |
| Keywords | geojson, map, leaflet |

## Links

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

## Dependencies (2)

- [leaflet](https://npm.io/package/leaflet.md) ^0.7.3
- [stream-wrapper](https://npm.io/package/stream-wrapper.md) ^0.1.2

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-02-25
- 1.0.1 — 2015-02-25
- 1.0.0 — 2015-02-25

## README

# leaflet-stream
[![NPM](https://nodei.co/npm/leaflet-stream.png)](https://nodei.co/npm/leaflet-stream/)


Install with `npm install leaflet-stream`.

Pipe geojson objects into a leaflet map object. Every object will be on their own 
layer and geojson properties will be converted to popups.

```js
var leafletstream = require('leaflet-stream')

var stream = leafletstream(map)

stream.write({
    "type": "Feature",
    "properties": {
      "name": "Eiffel Tower",
      "description": "The Eiffel Tower is an iron lattice tower located on the Champ de Mars in Paris.",
      "rating": 4.7,
      "height": "301m"
    },
    "geometry": {
        "type": "Point",
        "coordinates": [2.294481,48.85837]
    }
})

stream.end()
```

![Eiffel Tower](screen.png)

This module is similar to and inspired by [leaflet-geojson-stream](http://npm.im/leaflet-geojson-stream)

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