D
D
danilr2019-04-29 08:50:13
2GIS
danilr, 2019-04-29 08:50:13

Need to understand if there is a marker on the 2gis map?

When clicked, this method is executed:

close(){
      this.$emit('close-popup', this.isOpenRc)
      document.querySelector('.popup-rc-content').scrollTop=0;
      if(window.innerWidth<500){
        this.marker.remove();         // это удаляет маркер с карты
      }

If there is no marker on the map, then it gives an error - it is necessary that it does not perform this action if there is no marker on the map. How can you do?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question