Здравствуйте, подскажите, пожалуйста, в чем может быть проблема
На сайте использую карту, данные в нее загружаю через objectManager
$( "select.serviceFirst" ).change(function() {
if ($(this).val()!=''){
myMap.geoObjects.removeAll();
curval = $(this).val();
objectManager = new ymaps.ObjectManager({
// Чтобы метки начали кластеризоваться, выставляем опцию.
clusterize: false,
geoObjectOpenBalloonOnClick: true,
clusterOpenBalloonOnClick: true,
// ObjectManager принимает те же опции, что и кластеризатор.
gridSize: 32
});
objectManager.objects.options.set('preset', 'islands#greenDotIcon');
objectManager.clusters.options.set('preset', 'islands#greenClusterIcons');
myMap.geoObjects.add(objectManager);
$.ajax({
url: "<?=SITE_TEMPLATE_PATH?>"+"/map_"+curval+".json"
}).done(function(data) {
console.log('ok');
objectManager.add(data);
});
} else {
if ($('select#city').val()!=''){
myMap.geoObjects.removeAll();
panto($('select#city option:selected').text());
}
}
});Соотвественно при смене селекта, меняются и метки на карте, но по клику балун не показывается, но подсказка при наведении появляется.
Вот пример json файла
{
"type":"FeatureCollection",
"features":[{
"type":"Feature",
"id":0,
"geometry":{
"type":"Point",
"coordinates":"44.8350115,65.5009237"
},
"properties":{
"baloonContent":"Bek",
"clusterCaption":"\u043c\u0435\u0442\u043a\u0430",
"hintContent":"\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430"
}
},
{
"type":"Feature",
"id":1,
"geometry":{
"type":"Point",
"coordinates":"42.8946592,71.3759428"
},
"properties":{
"baloonContent":"\u0421\u0435\u0440\u0433\u0435\u0439",
"clusterCaption":"\u043c\u0435\u0442\u043a\u0430",
"hintContent":"\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0430"
}
}]
}