Answer the question
In order to leave comments, you need to log in
How to put a new Yandex map marker?
Good afternoon, there is now a new marker in the Yandex map.
But when I insert the map into my site (Through the API, the old marker goes)
Here is the map code itself
var myMap;
var myPlacemark;
var init = function init() {
myMap = new ymaps.Map("map", {
center: [57.652607, 39.830922],
zoom: 17,
controls: []
});
myMap.behaviors.disable('scrollZoom');
myPlacemark = new ymaps.Placemark([57.652607, 39.830922], {
hintContent: ''
}, {
iconLayout: 'default#image',
// Custom image for the placemark icon.
});
myMap.geoObjects.add(myPlacemark);
};
ymaps.ready(init);
Answer the question
In order to leave comments, you need to log in
There is no documentation in the documentation https://tech.yandex.ru/maps/doc/jsapi/2.1/ref/refe...
Who prevents you from setting your own icon?
var myPlacemark = new ymaps.Placemark([55.76, 37.56], {}, {
iconLayout: 'default#image',
iconImageHref: '/maps/doc/jsapi/2.1/examples/images/myIcon.gif',
iconImageSize: [30, 42],
iconImageOffset: [-3, -42]
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question