I have 2 waypoints and a number of transit points. These points form a route. Waypoints are the starting and ending points. They have markers with the meaning "A" and "B". Here's how I remove these markers?


Here is a link to the codepen and code:

function init () { var multiRoute = []; function createMultiRoute(routeData, viaData, color) { multiRoute.push( new ymaps.multiRouter.MultiRoute({ referencePoints: routeData, params: viaData }, { editorDrawOver: false, wayPointDraggable: true, viaPointDraggable: true, routeStrokeColor: "000088", routeActiveStrokeColor: color, pinIconFillColor: color, boundsAutoApply: true, zoomMargin: 30 })); } // Создаем карту с добавленными на нее кнопками. var myMap = new ymaps.Map('map', { center: [55.750625, 37.626], zoom: 14 }); createMultiRoute([ [60.014919, 30.649850], [60.014958, 30.648536], [60.017671, 30.646447], [60.019146, 30.645540], [60.024197, 30.645711], [60.025782, 30.644554], [60.028975, 30.640299], [60.027754, 30.630244], [60.024331, 30.631359], [60.023627, 30.637576], [60.023723, 30.638850], [60.024200, 30.645713] ], { viaIndexes: [1,2,3,4,5,6,7,8,9,10] }, "ff0000"); myMap.geoObjects.add(multiRoute[0]); } ymaps.ready(init); 

 #map { width: 600px; height: 400px; background: #000; } 

 <script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU"></script> <div id="map"></div> 

    1 answer 1

    You can hide the pin using the same prefixes that you use to customize the look:

     wayPointVisible: false 

    True in this case, the point will become inactive and it will not be possible to drag it and wayPointDraggable: true will lose its meaning.

    If the drag point is important, then you can make your less noticeable pin.