0.1.7 • Published 3 years ago

preact-leaflet-ts v0.1.7

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

typescript Preact leaflet

Still in development

A Preaect wrapper made in Javascript and converted to Javascript from Preact-leaflet. Credit goes to kontrollanten.

Supporting following Leaflet components:

Example

import { Map, TileLayer } from 'preact-leaflet';

<Map center={[63.83919, 20.15069]} style={{ height: '100%' }} zoom={10}>
  <TileLayer url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" />
</Map>

For more advanced examples, look into the e2e App and it's published version.

API

This is just a thin wrapper, checkout Leaflet API for usage.

Options

All props, except for on prefixed, are passed to Leaflet.

Event listeners

Props prefixed with on are handled as event listeners, e.g. onZoom will listen for the zoom event.

Todo:

  • Add tests (jasmine, mocha, jest)
0.1.8

3 years ago

0.1.7

3 years ago

0.1.6

3 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago