JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://api-maps.yandex.ru/2.1/?load=package.full&lang=ru-RU" type="text/javascript"></script>
<div id="map" style="width: 800px; height: 600px"></div>
JavaScript
var myMap, collection, searchControl, objectManager;
ymaps.ready(init);
function init () {
SearchControl = new ymaps.control.SearchControl({noPlacemark:true});
myMap = new ymaps.Map("map", {
center: [55.75629,37.618655],
zoom: 16,
type: 'yandex#map',
behaviors: ['default', 'scrollZoom'],
controls: ['zoomControl', SearchControl, 'typeSelector', 'fullscreenControl']
}, {
balloonMaxWidth: 600
});
objectManager = new ymaps.ObjectManager({
clusterize: false,
gridSize: 32
});
objectManager.add({
type: 'Feature',
id: 1,
geometry: {
type: 'Point',
coordinates: [55.754329,37.621272]
},
properties: {
hintContent: '1',
balloonContent: '1'
}
});
objectManager.add({
type: 'Feature',
id: 2,
geometry: {
type: 'Point',
coordinates: [55.75629,37.618655]
},
properties: {
hintContent: '2',
balloonContent: '2'
}
});
myMap.geoObjects.add(objectManager);
myMap.events.add(['boundschange','datachange','objecttypeschange'], function(e){
ymaps.geoQuery(objectManager.objects).searchInside(myMap).each(function (object) {
console.log(object);
});
});
}