1.0.2 • Published 4 years ago

@ffly4u/vue2-leaflet-tocoordinates v1.0.2

Weekly downloads
21
License
MIT
Repository
github
Last release
4 years ago

vue2-leaflet-toCoordinates

This is a toCoordinates plugin extension for vue2-leaflet package

Install

with npm:

npm install --save @ffly4u/leaflet-tocoordinates @ffly4u/vue2-leaflet-tocoordinates

or yarn:

yarn add @ffly4u/leaflet-tocoordinates @ffly4u/vue2-leaflet-tocoordinates

Usage

Look toCoordinates plugin Options for options

<v-map :zoom=3 :center="location">
  <v-tilelayer url="http://{s}.tile.osm.org/{z}/{x}/{y}.png"></v-tilelayer>
  <!-- IMPORTANT PART HERE -->
  <v-to-coordinates :options="toCoordinatesOptions" ></v-to-coordinates>
  <!-- /IMPORTANT PART HERE -->
</v-map>

<script>
import Vue from 'vue';
import Vue2Leaflet from 'vue2-leaflet';
import VToCoordinates from '@ffly4u/vue2-leaflet-toCoordinates';
import '@ffly4u/leaflet-tocoordinates/dist/leaflet.css';

Vue.component('v-map', Vue2Leaflet.Map);
Vue.component('v-tilelayer', Vue2Leaflet.TileLayer);

export default {
  components: { VToCoordinates },
  data() {
    return {
      toCoordinatesOptions: {
        // options
      },
    };
  },
};
</script>

License

MIT