1.0.2 • Published 3 years ago

solidjs-leaflet v1.0.2

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

solidjs-leaflet

A simple SolidJS wrapper for leaflet to display maps.

Installation

npm install solidjs-leaflet leaflet
yarn add solidjs-leaflet leaflet
pnpm add solidjs-leaflet leaflet

If you are using Typescript, also install:

npm install -D @types/leaflet
yarn add -D @types/leaflet
pnpm add -D @types/leaflet

Usage

To use the SolidJS leaflet wrapper:

import {SolidLeafletMap} from "solidjs-leaflet"

const Example = () => {
  return (
    <SolidLeafletMap
      center={[63.0, 13.0]}
      id="map"
      zoom={17}
      onMapReady={(l, m) => {
        const icon = l.icon({
          iconUrl: '/marker-icon.png',
          shadowUrl: '/marker-shadow.png',
        });
        const marker = l
          .marker([63.0 13.0], {
            icon,
          })
          .addTo(m);
        marker.bindPopup('Hello World!');
      }}
    />
  );
};
1.0.2

3 years ago

1.0.1

3 years ago

1.0.1-beta-3

3 years ago

1.0.1-beta-2

3 years ago

1.0.1-beta-1

3 years ago

1.0.1-beta-0

3 years ago

1.0.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago