M
M
Muvka2018-08-04 19:57:26
Yandex maps
Muvka, 2018-08-04 19:57:26

Is it possible to change the position of the center of the map depending on the width of the screen?

There is a map, on it the mark is not in the center of the screen. When the width of the browser window is reduced, the label goes outside the window. It needs to be centered after a certain width. Is there something like breakpoints? If yes, tell me where to read.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-08-04
@Muvka

You hang a handler on boundschange, in which you check the width and, if necessary, pull setCenter. Somehow so .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question