S
S
skuvaWeb2018-11-17 04:37:59
css
skuvaWeb, 2018-11-17 04:37:59

How to properly style yandex map baloon content?

The problem is this:
I use Yandex maps, at initialization I create my own labels with my content inside. Everything suits, but I want to change, for example, the default cross, I change the styles in my css, and after a week I find that they do not work anymore. It turned out that all Yandex map elements have a class name based on the version of something.
5bef7084dd9a4797462951.png
So, when I wrote my styles a week ago, I wrote classes with the prefix "ymaps-2-1-69", and now it's "ymaps-2-1-71". Am I doing something wrong? What is the right thing to do in such situations?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
freeExec, 2018-11-17
@skuvaWeb

Not right.
There is an example in the sandbox with a custom cross.

I
ildar-meyker, 2019-05-19
@ildar-meyker

I was also too lazy to do everything right for the sake of a little customization. Correct, of course, as in the example in the sandbox, but I decided to just hard-code the version when connecting. Quite a working solution, I think.

<script src="https://api-maps.yandex.ru/2.1.73/?apikey={КЛЮЧ}&lang=ru_RU"></script>

M
Moskus, 2018-11-17
@Moskus

Add there not text, but html, with some class of your own.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question