Answer the question
In order to leave comments, you need to log in
How to remove points from the Yandex map?
Hello! I built a route and I can't delete these points in any way: prntscr.com/h8ktmb
That is, the route itself must be left, and the point "a" and "b" should be deleted.
Here is the map code:
<script src="https://api-maps.yandex.ru/2.1/?load=package.full&lang=ru-RU" type="text/javascript"></script>
<script type="text/javascript">
function init() {
var multiRoute = new ymaps.multiRouter.MultiRoute({
referencePoints: [
[59.9336,30.3693],
[59.9315,30.3608]
],
});
// Создаем карту с добавленной на нее кнопкой.
var myMap = new ymaps.Map('newYandexMap', {
center: [59.9321,30.3579],
zoom: 16
});
myPlacemark = new ymaps.Placemark([59.9335,30.3684], {
hintContent: 'г. Санкт-Петербург ул. 4-ая Советская, д. 15 лит Б' }, {
// Опции. Необходимо указать данный тип макета.
iconLayout: 'default#image',
// Своё изображение иконки метки.
iconImageHref: '//name.ru/wp-content/themes/theme1/img/location.png',
// Размеры метки.
iconImageSize: [46, 64],
// Смещение левого верхнего угла иконки относительно её "ножки" (точки привязки).
iconImageOffset: [-28, -68]
});
// Добавляем мультимаршрут на карту.
myMap.geoObjects.add(multiRoute);
myMap.geoObjects.add(myPlacemark);
};
ymaps.ready(init);
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question