1.0.2 • Published 7 months ago

solidjs-leaflet v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months 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

7 months ago

1.0.1

7 months ago

1.0.1-beta-3

7 months ago

1.0.1-beta-2

7 months ago

1.0.1-beta-1

7 months ago

1.0.1-beta-0

7 months ago

1.0.0

7 months ago

0.0.3

7 months ago

0.0.2

7 months ago

0.0.1

7 months ago