I want to loop through the array of markers and place these marks on the map using the template engine
ymaps.ready(init); var myMap, markers = [{ lat: 55.2049, lon: 30.1843, name: 'Имя 1', address: 'Адрес1', phone: '+322-32-11-22-33' hintContent: '<h3>This is Hint 1</h3>' }, { lat: 54.80077688, lon: 32.00807933, name: 'Имя 2', address: 'Адрес 2', phone: '+322-32-55-66-111', hintContent: '<h3>This is Hint 2</h3>' } ]; function init() { myMap = new ymaps.Map("map", { center: [55.18, 30.23], zoom: 5, controls: ['routeButtonControl'], behaviors: ['drag'] }); markers.forEach(function(m){ var marker = new ymaps.Placemark( [m.lat, m.lon], { name: m.name, address: m.address, phone: m.phone, hintContent: m.hintContent }, { balloonContentLayout: BalloonContentLayoutClass } ); myMap.geoObjects.add(marker); }); var BalloonContentLayoutClass = ymaps.templateLayoutFactory.createClass( '<h3>{{ properties.name }}</h3>' + '<p>{{ properties.address }}</p>' + '<p>{{ properties.phone }}</p>' + ); ` Tags are placed, hint is visible, there is no balun. ((If the loop is not used, then the static data works normally.
`var marker = new ymaps.Placemark( [55.8, 37.6], { name: 'Имя', address: 'Адрес', phone: '+7 (222) 555-44-33', }, { balloonContentLayout: MyBalloonContentLayoutClass } ); myMap.geoObjects.add(marker);` Sorrow