Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

kontrollanten/preact-leaflet

Repository files navigation

preact-leaflet codecov CircleCI

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.

About

Potential with 45 kb gziped (including preact)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published