0.5.0 • Published 4 years ago

vue2-leaflet-editable v0.5.0

Weekly downloads
112
License
-
Repository
github
Last release
4 years ago

vue2-leaflet-editable

This is a Leaflet.Editable plugin extension for vue2-leaflet package

alt text

Install

npm install --save vue2-leaflet-editable
# or
yarn add vue2-leaflet-editable

Demo

Check out the live demo or run the following:

git clone git@github.com:geopan/vue2-leaflet-editable.git
cd vue2-leaflet-editable/example
npm i
npm run serve

Usage

<template>
  <editable-map editable :zoom="zoom" :center="center" style="height: 500px">
    <l-tile-layer :url="url" />
    <editable-polygon
      @click="editMode['polygon'] = !editMode['polygon']"
      :editable="editMode['polygon']"
      :lat-lngs="polygon"
    />
  </editable-map>
</template>

<script>
import { LTileLayer } from "vue2-leaflet";
import { EditableMap, EditablePolygon } from vue2-leaflet-editable";

export default {
  name: the-map,
  components: {
    LTileLayer,
    EditableMap,
    EditablePolygon,
  },
  data: ()=> ({
    zoom: 14,
    center: [-33.8688, 151.2093],
    url: "http://{s}.tile.osm.org/{z}/{x}/{y}.png",
    polygon: [
      [-33.8688, 151.2093],
      [-33.86, 151.2093],
      [-33.86, 151.215],
      [-33.8688, 151.215]
    ],
  })
}
</script>

<style>
@import "../node_modules/leaflet/dist/leaflet.css";
</style>

Author

Guillaume de Boyer-Montegut

0.5.0

4 years ago

0.4.0

4 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.9

5 years ago

0.1.8

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago