P
P
photosho2022-02-02 13:27:23
JavaScript
photosho, 2022-02-02 13:27:23

How to get the coordinates of the center of the map?

You need to get the center of the map and then set it when creating a new map. I usually set the center like this:

new ymaps.Map('map',
  {
    center: [55.85643, 37.99974]
  }
);

But this is only when creating a map. I did not find information on how to set the center after the creation of the map and how to get this information.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2022-02-02
@photosho

Well, how can you not find it
https://yandex.ru/dev/maps/archive/doc/jsapi/2.0/r...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question