A
A
Artur Galyaev2022-03-26 16:01:11
JavaScript
Artur Galyaev, 2022-03-26 16:01:11

How to remove a balloon marker in Yandex Map Api?

623f0dc49ddff405103445.png

When you select an address, along with a pop-up element (balloon), a marker of this place is displayed.
When I click on the map, a marker is created for this place, but removeAll does not remove this marker from the balloon.
As a result, 2 markers are displayed at once. How to remove the balloon marker?

ymap.geoObjects.removeAll(); // не удаляет маркер балуна
let placemark = new ymaps.Placemark([lt, lg]);
ymap.geoObjects.add(placemark);

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