JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://api-maps.yandex.ru/2.1/?lang=ru-RU"></script>
<script src="https://yandex.st/jquery/2.2.3/jquery.min.js"></script>
<div id="map"></div>
CSS
html, body, #map {
width: 100%; height: 100%; padding: 0; margin: 0;
}
JavaScript
ymaps.ready(function() {
var myMap = new ymaps.Map('map', {
center: [55, 150],
zoom: 2
}),
objectManager = new ymaps.ObjectManager();
objectManager.add({
type: "FeatureCollection",
features: [
{
type: "Feature",
id: 123,
geometry: {
type: "Point",
coordinates: [55, 37]
}
}
]
});
myMap.geoObjects.add(objectManager);
// problem demo:
var i = 0;
var t = setInterval(function() {
i++;
var position = myMap.getGlobalPixelCenter();
myMap.setGlobalPixelCenter([ position[0] - 5, position[1] ]);
if (i >= 250) {
clearInterval(t);
}
}, 20);
});