Answer the question
In order to leave comments, you need to log in
How to change the position of the mark on the Yandex map?
I brought out a map with a label on the site, but the label is located immediately in the center. The fact is that you need the label to be a little to the left so that the content fits on the right. Can't find how to change this setting?
ymaps.ready(init);
function init(){
var myMap;
myMap = new ymaps.Map("map", {
//center: [55.7652, 37.63836], //
center: [59.8816, 30.31581],
//zoom: 17,
zoom: 16,
controls: []
});
myMap.behaviors.disable('scrollZoom');
myMap.controls.add("zoomControl", {
position: {top: 15, left: 15}
});
//var myPlacemark = new ymaps.Placemark([55.7649, 37.63836] , {},
//var myPlacemark = new ymaps.Placemark([59.8816, 30.31581] , {},
var myPlacemark = new ymaps.Placemark([59.8816, 30.31581] , {},
{ iconLayout: 'default#image',
iconImageHref: 'map-balloon.png',
//iconImageSize: [290, 152],
iconImageSize: [300, 157],
//iconImageOffset: [-20, -47] });
iconImageOffset: [-110, -67] });
myMap.geoObjects.add(myPlacemark);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question