R
R
rolecs2021-08-23 13:34:08
JavaScript
rolecs, 2021-08-23 13:34:08

How to add one collection of objects to two maps (Yandex maps API)?

Objects are only added to the last map:

map.geoObjects.add(polygons);
smallMap.geoObjects.add(polygons);

or
smallMap.geoObjects.add(polygons);
map.geoObjects.add(polygons);

Maybe some object identifiers need to be changed?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexandroppolus, 2021-08-23
@Alexandroppolus

It seems that to add to the second map, you will have to make a copy of the object.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question