Answer the question
In order to leave comments, you need to log in
How to change marker size?
There is a marker, I would like to change its size (increase). Please help, here is my attempt:
JSFIDDLE
let map;
ymaps.ready().then(() => {
map = new ymaps.Map('map', {
center: [51.8005930, 12.2119510],
zoom: 15
});
const marker = new ymaps.Placemark([51.8005930, 12.2119510], {}, {
preset: 'islands#blueHomeIcon',
iconImageSize: [268, 268]
});
map.geoObjects.add(marker);
});
Answer the question
In order to leave comments, you need to log in
Label-preset - no way.
You will have to use either a CSS sprite or even your own image (bad practice).
Example from doc-ii :
var myPlacemark3 = new ymaps.Placemark([55.85, 1.0], {}, {
iconLayout: 'default#image',
iconImageClipRect: ,
iconImageHref: 'images/sprite.png',
iconImageSize: [35, 63],
iconImageOffset: [-35, -63]
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question