0.1.7 • Published 6 months ago

vue-use-leaflet v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

vue-use-leaflet npm version npm downloads

Vue composition utilities for leaflet map.

Documentation & Demo

Installation

# NPM
$ npm install vue-use-leaflet leaflet

# Yarn
$ yarn add vue-use-leaflet leaflet

# pnpm
$ pnpm install vue-use-leaflet leaflet

Usage

import { useLeafletMap, useLeafletTileLayer, useLeafletDisplayLayer } from 'vue-use-leaflet';

export default {
  setup() {
    // dom element reference
    const element = ref(null);

    // create leaflet map
    const map = useLeafletMap(element);

    // create osm tile layer
    const tileLayer = useLeafletTileLayer(
      'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
    );

    // add layer to the map
    useLeafletDisplayLayer(map, tileLayer);

    return { element };
  }
};

License

Licensed under the MIT License.

0.1.7

6 months ago

0.1.0

11 months ago

0.1.2

10 months ago

0.1.1

11 months ago

0.1.4

9 months ago

0.1.3

10 months ago

0.1.6

7 months ago

0.1.5

8 months ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago