N
N
nurzhannogerbek2019-02-05 09:47:01
JavaScript
nurzhannogerbek, 2019-02-05 09:47:01

How to override the behavior of the marker that appears when searching in Yandex map?

Hello comrades! Please help me figure it out.
In the Vue.js application, I connected a Yandex map . It has a SearchControl element . I need to do the following. When you enter an address in the SearchControl element , a marker ( Placemark ) appears on the map. When you click this marker, you need to open a custom form with pre-filled longitude and width data. I'm interested in how to override the behavior of this marker that appears when searching. By default, clicking on a marker opens a default balloon.

const searchControl = new ymaps.control.SearchControl({
    options: {
        float: 'right',
        noPlacemark: false,
    },
});

self.map = new ymaps.Map(
    "yandex-map",
    {
        center: [48.583213, 66.017493],
        zoom: 5,
        controls: [
            searchControl,
            'fullscreenControl',
        ],
        searchControlProvider: 'yandex#search',
    },
    {
        restrictMapArea: true,
        suppressMapOpenBlock: true,
    },
);

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