X
X
xonar2020-04-21 02:27:56
JavaScript
xonar, 2020-04-21 02:27:56

How to set a border for a label in Yandex maps?

Goodnight.

Can you tell me how to add a border to the image of the label on the Yandex map?

It is necessary that there is a border around the image, for example 3px solid red;

It turns out not quite what you need.

Code - https://codepen.io/ruslan-lysenko/pen/XWmjPPy

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xonar, 2020-04-21
@xonar

Solved a problem.
https://codepen.io/ruslan-lysenko/pen/XWmjPPy
Namely, it was only necessary to conjure here:

MyIconContentLayout = ymaps.templateLayoutFactory.createClass(
            '<div style="position: relative;"><div style="position: absolute;left: -15px;top: -15px; border: 3px solid red;width: 25px;height: 25px;">$[properties.iconContent]</div></div>'
        ),

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question