D
D
Denis2021-12-05 22:44:22
JavaScript
Denis, 2021-12-05 22:44:22

How do I change my image back to default in ymaps?

when points hit the polygon, I set the following parameters

preset: 'islands#redStretchyIcon',
                    iconLayout: 'default#image',
                    iconImageHref: "../img/231.png",
                    iconImageSize: [8, 8],
                    iconImageOffset: [-4, -4],
                    visible: true


let's say I need to mark the first point
object.options.set({'preset': 'islands#pinkDotIcon'});


if I specify labels without a picture img/231.png, then new labels are drawn as needed. With a picture, he doesn't want to. How can I return the default settings for the desired label and change their style?

Doesn't want to:
object.options.set('iconLayout', 'default#redPoint');

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