R
R
RodgerFox2017-02-03 12:09:03
Yandex
RodgerFox, 2017-02-03 12:09:03

How can I access new data on the map after redrawing via reloadData()?

Good evening. Can you please tell me how to work with map objects after updating them via objectManager.setUrlTemplate (getting new values) and objectManager.reloadData() , rewriting labels?
For example:
objectManager.objects.getLength();
Can only be used before labels are overwritten, but it returns the "old" result, not the new one.
I'm trying something like this:

myMap.panTo(myMap.geoObjects.getBounds(), {checkZoomRange:true});

, but sometimes it brings the point very close and you have to reduce the map zoom. Or for example:
myMap.setBounds(myMap.geoObjects.getBounds());
It is also not possible to use after objectManager.reloadData(). I don't understand how to center the map using LOM?
objectManager is LOM
objectManager = new ymaps.LoadingObjectManager

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question