D
D
Denoro552019-05-30 19:16:40
JavaScript
Denoro55, 2019-05-30 19:16:40

How to get data from a marker on a Yandex Maps map?

function init() {
    var myMap = new ymaps.Map('map', {
        center: [55.74, 37.58],
        zoom: 13,
        controls: []
    });
    var searchControl = new ymaps.control.SearchControl({
        options: {
            provider: 'yandex#search'
        }
    });
    myMap.controls.add(searchControl);
    searchControl.search('Шоколадница');
}
ymaps.ready(init);

An example from the documentation https://tech.yandex.ru/maps/jsbox/2.1/search_contr...
I am searching for some organizations and display icons on the map.
1. How can I change the image of found tags?
2. How can I get data when clicking on the found label?

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