Vue2leaflet: Zoom event not working

Created on 24 May 2017  路  2Comments  路  Source: vue-leaflet/Vue2Leaflet

When I do a zoom in the map the event isn't being called. My component:

<template>
  <v-map ref="map" :zoom="zoom" :center="center" v-on:l-zoom="zoom">
    <v-tilelayer :url="titleLayer"></v-tilelayer>
    <v-marker :lat-lng="center"></v-marker>
  </v-map>
</template>

<script>

// Component
export default {
  name: 'map',

  data () {
    return {
      titleLayer: 'secret'
    }
  },

  methods: {

    zoom (evt) {
      console.log(evt) // not showing anything
    },
  },

  computed: {
    center () {
      return this.$store.state.map.center
    },
    zoom () {
      return this.$store.state.map.zoom
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
</style>

Most helpful comment

v-on:l-zoom implemented in v0.0.50

All 2 comments

You should use v-on:l-moveend instead of v-on:l-zoom

There is no zoom event handled by vue2-leaflet

v-on:l-zoom implemented in v0.0.50

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rhoseno98 picture rhoseno98  路  4Comments

lusman20 picture lusman20  路  4Comments

mpallante picture mpallante  路  4Comments

DmitriyVTitov picture DmitriyVTitov  路  4Comments

shtw picture shtw  路  5Comments