leafletjs-svelte
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

Leafletjs-svelte

Svelte component for LeafletJS.

  • Written in TypeScript.
  • Supports skipping initializing Leaflet in SSR environments but instead only hydrate maps on the client-side.
  • Vector drawing support (coming soon...)

Installation

Node 16 or higher is required.

$ npm install leaflet leafletjs-svelte

Import stylesheet for Leaflet in your app entry point:

import 'leaflet/dist/leaflet.css';

Component Import:

<script>
  import { Leaflet } from 'leafletjs-svelte';
</script>

Components:

UI layers:

  • [x] Marker
  • [x] Popup
  • [x] Tooltip

Raster layers:

  • [x] TileLayer
  • [x] TileLayer.WMS
  • [x] ImageOverlay
  • [x] VideoOverlay

Vector layers:

  • [x] Polyline
  • [x] Polygon
  • [x] Circle
  • [x] CircleMarker
  • [x] Rectangle

Other layers:

  • [x] LayerGroup
  • [x] FeatureGroup
  • [x] GeoJSON

Supported Plugins:

Vector Drawing:

  • [x] Circle
  • [x] CircleMarker
  • [x] Marker
  • [x] Polyline
  • [x] Polygon
  • [x] Rectangle
  • [ ] Multi-Rectangle

Readme

Keywords

Package Sidebar

Install

npm i leafletjs-svelte

Weekly Downloads

17

Version

0.1.1

License

MIT

Unpacked Size

49.4 kB

Total Files

63

Last publish

Collaborators

  • lampoppa