D
D
Dima Pautov2021-11-03 15:11:43
JavaScript
Dima Pautov, 2021-11-03 15:11:43

How to replace standard markers when building a route in yandex maps?

Good afternoon))

Using Yandex maps, I build a route from point A to point B using the method ymaps.route()

The code itself:

ymaps.route([
          userCoords,
          ...routesCoords
        ]).then(route => {
          route.getPaths().options.set({
            strokeColor: '#E30611',
            strokeWidth: 2,
            strokeStyle: '1 2'
          });

          map.geoObjects.add(route);
        });


There are no problems in this regard, everything is fine. But, then the task arose, to make the route its own design of markers.
Now there are standard ones with numbering, in the dock I did not find an example of how to make my own marker.

Mind is enough to create additional. markers and set them on the map, but the result is expected))
61827b2a97085824322052.jpeg

In Google I didn’t find anything about this at all, although the query may not have been built correctly.
Please tell me if it is possible to do this, and if so, how to replace the standard ones with your own?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2021-11-03
@bootd

https://yandex.ru/dev/maps/jsbox/2.1/multiroute_vi...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question