Answer the question
In order to leave comments, you need to log in
How to change the display of the Yandex.Maps position on click?
The page has a Bitrix component with a Yandex map. It is necessary to transfer other coordinates to the map by clicking on the button and display them. How can this be done with the API?
I started with this, then I don’t know how to do it right. Please help.
$(document).on('change','#himki',function(){
});
Answer the question
In order to leave comments, you need to log in
In general, usually links to map objects are still saved so that they can be used, like in your case. But if they are not there, then you can try to decorate the constructor and store these references, for example, in the target element object, something like this:
ymaps.ready(function() {
const old_Map = ymaps.Map;
ymaps.Map = function() {
var args = Array.prototype.slice.call(arguments);
args.unshift(0);
var obj = new (Function.prototype.bind.apply(old_Map, args));
document.getElementById(args[1]).yaMap = obj;
return obj;
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question