K
K
kr_ilya2019-05-08 07:15:50
JavaScript
kr_ilya, 2019-05-08 07:15:50

Error in nextTick: "RangeError: Maximum call stack size exceeded"?

I want to connect yandex map according to this example . But something goes wrong and in the console I see the error Error in nextTick: "RangeError: Maximum call stack size exceeded"
Here is the component code:

<template>
  <div>
    <div class="mapouter">
      <div class="gmap_canvas">
         <yandex-map 
  :coords="[54.62896654088406, 39.731893822753904]"
  zoom="10"
  style="width: 600px; height: 600px;"
  :cluster-options="{
    1: {clusterDisableClickZoom: true}
  }"
  :placemarks="placemarks"
  map-type="hybrid"
  @map-was-initialized="initHandler"
>
</yandex-map>
      </div>
    </div>
  </div>
</template>
<script type="text/javascript">
  import { yandexMap, ymapMarker } from 'vue-yandex-maps'
  export default {
    name: 'yandex-map',
  data() {
  return {
    placemarks: [
      {
        coords: [54.8, 39.8],
        properties: {}, // define properties here
        options: {}, // define options here
        clusterName: "1",
        callbacks: { click: function() {} }
      }
    ]
  }
},
 methods: {
    initHandler () {
      var geolocation = yandexMap.geolocation,
        myMap = new yandexMap.Map('#yandex-map', {
            center: [55, 34],
            zoom: 10
        }, {
            searchControlProvider: 'yandex#search'
        });
    }

  }
}
</script>
<style>
.mapouter {
  text-align:right;
  height:100%;
  width:100%;
  position: absolute;
}
.gmap_canvas {
  overflow:hidden;
  background:none!important;
  height:100%;
  width:100%;
}
</style>

What's wrong with it?
Did it in a hurry.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Robur, 2019-05-09
@kr_ilya

You render the same yandex-map component in the yandex-map component, which inside renders the same yandex-map component .. well, I think you understand.
Do it not in a hurry, but thoughtfully.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question